From 99bd6dc7c7688fbfbda45a4ee4a895c03faa60fd Mon Sep 17 00:00:00 2001 From: SebastianStork Date: Tue, 25 Feb 2025 23:11:29 +0100 Subject: [PATCH] Change de.theme type from str to enum --- modules/home/de/theme.nix | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/modules/home/de/theme.nix b/modules/home/de/theme.nix index c6b0cc6..496054e 100644 --- a/modules/home/de/theme.nix +++ b/modules/home/de/theme.nix @@ -8,10 +8,15 @@ let cfg = config.myConfig.de; in { - options.myConfig.de.theme = lib.mkOption { type = lib.types.str; }; + options.myConfig.de.theme = lib.mkOption { + type = lib.types.enum [ + "dark" + "light" + ]; + }; config = lib.mkMerge [ - (lib.mkIf ((cfg.theme == "dark") || (cfg.theme == "light")) { + { gtk = { enable = true; gtk2.configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc"; @@ -30,7 +35,7 @@ in package = pkgs.bibata-cursors; size = 24; }; - }) + } (lib.mkIf (cfg.theme == "dark") { dconf.settings."org/gnome/desktop/interface".color-scheme = "prefer-dark";