From 5a5db9ba8dd772d748b56630a9c08ccdfaa6c8db Mon Sep 17 00:00:00 2001 From: Tim Keller Date: Mon, 6 Jan 2025 15:07:09 -0600 Subject: change hp theme to green and make mint themes an enum for better ctrl of color choice --- modules/home/theme.nix | 25 ++++++++++++++++++++----- modules/hosts/hp-envy-office/home.nix | 4 ++-- 2 files changed, 22 insertions(+), 7 deletions(-) (limited to 'modules') 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; diff --git a/modules/hosts/hp-envy-office/home.nix b/modules/hosts/hp-envy-office/home.nix index 1df168c..ee56dc6 100644 --- a/modules/hosts/hp-envy-office/home.nix +++ b/modules/hosts/hp-envy-office/home.nix @@ -1,7 +1,7 @@ { ... }: { imports = [ ../../home ]; - theme.mint.theme.color = "Dark-Red"; - theme.mint.icons.color = "Red"; + theme.mint.theme.color = "Dark-Green"; + theme.mint.icons.color = "Green"; wallpapers.enable = true; } -- cgit v1.2.3