This commit is contained in:
Damocles 2026-04-12 15:58:13 +02:00
parent 4df704844e
commit 9e1716aa39
14 changed files with 154 additions and 102 deletions

View file

@ -56,33 +56,37 @@ in
description = "Enable or disable individual bar modules.";
default = { };
type = lib.types.submodule {
options = lib.genAttrs
[
"workspaces"
"tray"
"windowTitle"
"clock"
"notifications"
"mpris"
"volume"
"bluetooth"
"backlight"
"network"
"powerProfile"
"idleInhibitor"
"weather"
"temperature"
"cpu"
"memory"
"disk"
"battery"
"power"
]
(name: lib.mkOption {
type = lib.types.bool;
default = true;
description = "Enable the ${name} module.";
});
options =
lib.genAttrs
[
"workspaces"
"tray"
"windowTitle"
"clock"
"notifications"
"mpris"
"volume"
"bluetooth"
"backlight"
"network"
"powerProfile"
"idleInhibitor"
"weather"
"temperature"
"cpu"
"memory"
"disk"
"battery"
"power"
]
(
name:
lib.mkOption {
type = lib.types.bool;
default = true;
description = "Enable the ${name} module.";
}
);
};
};
@ -123,12 +127,11 @@ in
};
config = lib.mkIf cfg.enable {
home.packages =
[
self.packages.${pkgs.stdenv.hostPlatform.system}.nova-shell-cli
pkgs.nerd-fonts.symbols-only
]
++ lib.optional cfg.modules.weather pkgs.wttrbar;
home.packages = [
self.packages.${pkgs.stdenv.hostPlatform.system}.nova-shell-cli
pkgs.nerd-fonts.symbols-only
]
++ lib.optional cfg.modules.weather pkgs.wttrbar;
xdg.configFile."nova-shell/modules.json".source =
(pkgs.formats.json { }).generate "nova-shell-modules.json"