From 10bb7b5c3158746c2e023212e36f834955c58f46 Mon Sep 17 00:00:00 2001 From: SebastianStork Date: Tue, 28 May 2024 20:55:16 +0200 Subject: [PATCH] Extract theming from the de configuration --- modules/home/de/default.nix | 6 ------ modules/home/default.nix | 3 ++- modules/home/{de => }/hyprland/default.nix | 2 +- modules/home/{de => }/hyprland/keybinds.nix | 0 modules/home/shell/aliases.nix | 2 +- modules/home/{de => }/theme.nix | 4 ++-- modules/home/vscode.nix | 2 +- users/seb/@inspiron.nix | 2 +- users/seb/@north.nix | 2 +- users/seb/home.nix | 4 +--- 10 files changed, 10 insertions(+), 17 deletions(-) delete mode 100644 modules/home/de/default.nix rename modules/home/{de => }/hyprland/default.nix (96%) rename modules/home/{de => }/hyprland/keybinds.nix (100%) rename modules/home/{de => }/theme.nix (94%) diff --git a/modules/home/de/default.nix b/modules/home/de/default.nix deleted file mode 100644 index fe78fbf..0000000 --- a/modules/home/de/default.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ - imports = [ - ./hyprland - ./theme.nix - ]; -} diff --git a/modules/home/default.nix b/modules/home/default.nix index 07b8ec9..3ce4dd1 100644 --- a/modules/home/default.nix +++ b/modules/home/default.nix @@ -1,6 +1,7 @@ { imports = [ - ./de + ./hyprland + ./theme.nix ./vscode.nix ./shell ./ssh-client.nix diff --git a/modules/home/de/hyprland/default.nix b/modules/home/hyprland/default.nix similarity index 96% rename from modules/home/de/hyprland/default.nix rename to modules/home/hyprland/default.nix index c8ac09f..7eff3ab 100644 --- a/modules/home/de/hyprland/default.nix +++ b/modules/home/hyprland/default.nix @@ -16,7 +16,7 @@ wrappers.waybar wrappers.hyprlock - (wrappers.rofi { inherit (config.myConfig.de) theme; }) + (wrappers.rofi { inherit (config.myConfig) theme; }) pkgs.cliphist pkgs.wl-clipboard (pkgs.writeScriptBin "clipboard" "cliphist list | rofi -dmenu -display-columns 2 | cliphist decode | wl-copy") diff --git a/modules/home/de/hyprland/keybinds.nix b/modules/home/hyprland/keybinds.nix similarity index 100% rename from modules/home/de/hyprland/keybinds.nix rename to modules/home/hyprland/keybinds.nix diff --git a/modules/home/shell/aliases.nix b/modules/home/shell/aliases.nix index d3f6b8a..201abd8 100644 --- a/modules/home/shell/aliases.nix +++ b/modules/home/shell/aliases.nix @@ -84,7 +84,7 @@ dark = ""; light = "GitHub"; } - .${config.myConfig.de.theme}; + .${config.myConfig.theme}; in { cat = "bat --plain --theme=${theme}"; diff --git a/modules/home/de/theme.nix b/modules/home/theme.nix similarity index 94% rename from modules/home/de/theme.nix rename to modules/home/theme.nix index 13bd13e..f1daaef 100644 --- a/modules/home/de/theme.nix +++ b/modules/home/theme.nix @@ -5,10 +5,10 @@ ... }: let - cfg = config.myConfig.de; + cfg = config.myConfig; in { - options.myConfig.de.theme = lib.mkOption { type = lib.types.str; }; + options.myConfig.theme = lib.mkOption { type = lib.types.str; }; config = lib.mkMerge [ (lib.mkIf (cfg.theme == "dark") { diff --git a/modules/home/vscode.nix b/modules/home/vscode.nix index 97daa21..f6b9e40 100644 --- a/modules/home/vscode.nix +++ b/modules/home/vscode.nix @@ -41,7 +41,7 @@ dark = "Gruvbox Dark Hard"; light = "GitHub Light"; } - .${config.myConfig.de.theme}; + .${config.myConfig.theme}; "workbench.iconTheme" = "material-icon-theme"; "editor.fontFamily" = "JetBrainsMono Nerd Font"; "explorer.confirmDelete" = false; diff --git a/users/seb/@inspiron.nix b/users/seb/@inspiron.nix index a37bc0c..60e86f1 100644 --- a/users/seb/@inspiron.nix +++ b/users/seb/@inspiron.nix @@ -5,6 +5,6 @@ home-manager.users.seb = { home.packages = [ (wrappers.hypridle { lockOnSleep = true; }) ]; - myConfig.de.theme = "light"; + myConfig.theme = "light"; }; } diff --git a/users/seb/@north.nix b/users/seb/@north.nix index 7c007f3..148875e 100644 --- a/users/seb/@north.nix +++ b/users/seb/@north.nix @@ -11,6 +11,6 @@ (wrappers.hypridle { lockOnSleep = false; }) ]; - myConfig.de.theme = "dark"; + myConfig.theme = "dark"; }; } diff --git a/users/seb/home.nix b/users/seb/home.nix index 480ea03..b5fc396 100644 --- a/users/seb/home.nix +++ b/users/seb/home.nix @@ -8,9 +8,7 @@ { myConfig = { de.hyprland.enable = osConfig.myConfig.de.hyprland.enable; - shell.enable = true; - ssh-client.enable = true; git.enable = true; vscode.enable = true; @@ -37,6 +35,6 @@ wrappers.obsidian wrappers.marktext wrappers.webcord - (wrappers.kitty { inherit (config.myConfig.de) theme; }) + (wrappers.kitty { inherit (config.myConfig) theme; }) ]; }