extract stylix to separate module, add nixos module with auto-import

This commit is contained in:
Damocles 2026-04-26 18:38:35 +02:00
parent 35f880b563
commit 7eaa50327f
5 changed files with 90 additions and 49 deletions

22
nix/nixos-module.nix Normal file
View file

@ -0,0 +1,22 @@
self:
{
config,
options,
lib,
...
}:
let
cfg = config.programs.nova-shell;
in
{
options.programs.nova-shell.enable = lib.mkEnableOption "nova-shell Quickshell bar";
config = lib.mkIf cfg.enable (
lib.optionalAttrs (options ? home-manager) {
home-manager.sharedModules = [
self.homeModules.default
]
++ lib.optionals (options ? stylix) [ self.homeModules.stylix ];
}
);
}