disable modules, README, warning fixes

This commit is contained in:
Damocles 2026-04-12 12:19:30 +02:00
parent ed68b9fd93
commit 5ad933c03b
9 changed files with 215 additions and 24 deletions

View file

@ -52,6 +52,39 @@ in
description = "nova-shell package to use.";
};
modules = lib.mkOption {
description = "Enable or disable individual bar modules.";
default = { };
type = lib.types.submodule {
options = lib.genAttrs
[
"tray"
"windowTitle"
"clock"
"notifications"
"mpris"
"volume"
"bluetooth"
"backlight"
"network"
"powerProfile"
"idleInhibitor"
"weather"
"temperature"
"cpu"
"memory"
"disk"
"battery"
"wlogout"
]
(name: lib.mkOption {
type = lib.types.bool;
default = true;
description = "Enable the ${name} module.";
});
};
};
theme = lib.mkOption {
type = lib.types.attrsOf lib.types.anything;
default = { };
@ -80,10 +113,15 @@ in
config = lib.mkIf cfg.enable {
programs.nova-shell.theme = lib.mkIf stylixAvailable (lib.mkDefault stylixTheme);
home.packages = [
self.packages.${pkgs.stdenv.hostPlatform.system}.nova-shell-cli
pkgs.nerd-fonts.symbols-only
];
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" cfg.modules;
xdg.configFile."nova-shell/theme.json".source =
(pkgs.formats.json { }).generate "nova-shell-theme.json"