diff options
Diffstat (limited to 'modules/home/desktop/default.nix')
| -rw-r--r-- | modules/home/desktop/default.nix | 75 |
1 files changed, 50 insertions, 25 deletions
diff --git a/modules/home/desktop/default.nix b/modules/home/desktop/default.nix index e434c6c..6b2ab79 100644 --- a/modules/home/desktop/default.nix +++ b/modules/home/desktop/default.nix @@ -2,29 +2,33 @@ with lib; with lib.${namespace}; let cfg = config.${namespace}.desktop; -in { - options.${namespace}.desktop = with types; { - enable = mkEnableOption "desktop"; + themeType = with types; submodule { + options = { + name = mkOption { + type = str; + }; - background = mkOption { - type = enum [ - "lycoris.png" - "matama.png" - "mem.png" - "nonon.png" - "ryo.png" - "shinobu.png" - "skull.png" - ]; - apply = value: ./bg/${value}; - }; + gtk = { + package = mkOption { + type = types.nullOr types.package; + default = null; + example = literalExpression "pkgs.gnome.gnome-themes-extra"; + description = '' + Package providing the theme. This package will be installed + to your profile. If `null` then the theme + is assumed to already be available in your profile. - theme = { - name = mkOption { - type = enum [ "gruvbox" ]; - default = "gruvbox"; + For the theme to apply to GTK 4, this option is mandatory. + ''; + }; + + name = mkOption { + type = types.str; + example = "Adwaita"; + description = "The name of the theme within the package."; + }; }; - + colors = let mkColorOption = name: { inherit name; @@ -39,19 +43,40 @@ in { }; in listToAttrs (map mkColorOption [ "accent" - + "black" "red" "green" "yellow" "blue" "magenta" "cyan" "white" "brightBlack" "brightRed" "brightGreen" "brightYellow" "brightBlue" "brightMagenta" "brightCyan" "brightWhite" - + "bg" "bg0" "bg1" "bg2" "bg3" "bg4" "fg" "fg0" "fg1" "fg2" "fg3" "fg4" - + "orange" "brightOrange" ]); }; }; +in { + options.${namespace}.desktop = with types; { + enable = mkEnableOption "desktop"; + + background = mkOption { + type = enum [ + "lycoris.png" + "matama.png" + "mem.png" + "nonon.png" + "ryo.png" + "shinobu.png" + "skull.png" + ]; + apply = value: ./bg/${value}; + }; - config = { - cxl.desktop.theme.colors = import ./theme/${cfg.theme.name}.nix; + themes = mkOption { + type = attrsOf themeType; + }; + + theme = mkOption { + type = themeType; + }; }; } |