diff options
Diffstat (limited to 'modules/home/theme.nix')
-rw-r--r-- | modules/home/theme.nix | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/modules/home/theme.nix b/modules/home/theme.nix index b12f866..4128e1d 100644 --- a/modules/home/theme.nix +++ b/modules/home/theme.nix @@ -1,15 +1,30 @@ -{ config, lib, pkgs, ... }: { +{ config, lib, pkgs, ... }: +let + transformColorValue = color : + if color == "Green" then "Mint-Y" + else if color == "Dark-Green" then "Mint-Y-Dark" + else "Mint-Y-${color}" + ; +in { options = { theme.mint = { enable = lib.mkEnableOption "enables mint theme"; # TODO add theme.dark option instead of specifying Dark-Color theme.color = lib.mkOption { - type = lib.types.str; + type = lib.types.enum [ + "Aqua" "Blue" "Green" "Grey" "Orange" "Pink" "Purple" "Red" + "Sand" "Teal" "Dark-Aqua" "Dark-Blue" "Dark-Green" + "Dark-Grey" "Dark-Orange" "Dark-Pink" "Dark-Purple" + "Dark-Red" "Dark-Sand" "Dark-Teal" + ]; default = "Dark-Aqua"; description = "mint-y theme color eg. 'Dark-Aqua' or 'Red'"; }; icons.color = lib.mkOption { - type = lib.types.str; + type = lib.types.enum [ + "Aqua" "Blue" "Green" "Grey" "Orange" "Pink" "Purple" "Red" + "Sand" "Teal" + ]; default = "Aqua"; description = "mint-y icons color eg. 'Aqua' or 'Red'"; }; @@ -21,11 +36,11 @@ enable = true; theme = lib.mkIf config.theme.mint.enable { package = pkgs.mint-themes; - name = "Mint-Y-${config.theme.mint.theme.color}"; + name = transformColorValue config.theme.mint.theme.color; }; iconTheme = lib.mkIf config.theme.mint.enable { package = pkgs.mint-y-icons; - name = "Mint-Y-${config.theme.mint.icons.color}"; + name = transformColorValue config.theme.mint.icons.color; }; font = { package = pkgs.inter; |