From 8cc1a65fd8e5a525fbe0cd9e6bf12b73cf57c606 Mon Sep 17 00:00:00 2001 From: SebastianStork Date: Wed, 14 Aug 2024 15:32:51 +0200 Subject: [PATCH] Make gammastep and theming part of DE configuration --- modules/home/de/cliphist.nix | 2 +- modules/home/{night-light.nix => de/gammastep.nix} | 4 ++-- modules/home/de/hyprland/default.nix | 3 ++- modules/home/{ => de}/theme.nix | 4 ++-- modules/home/shell/aliases.nix | 2 +- modules/home/vscode.nix | 2 +- users/seb/@inspiron/home.nix | 2 +- users/seb/@north/home.nix | 2 +- users/seb/home.nix | 3 +-- 9 files changed, 12 insertions(+), 12 deletions(-) rename modules/home/{night-light.nix => de/gammastep.nix} (58%) rename modules/home/{ => de}/theme.nix (92%) diff --git a/modules/home/de/cliphist.nix b/modules/home/de/cliphist.nix index 8e4b90e..215c995 100644 --- a/modules/home/de/cliphist.nix +++ b/modules/home/de/cliphist.nix @@ -17,7 +17,7 @@ systemd.user.services.cliphist.Service.ExecStartPre = "${lib.getExe config.services.cliphist.package} wipe"; home.packages = [ - (wrappers.rofi { inherit (config.myConfig) theme; }) + (wrappers.rofi { inherit (config.myConfig.de) theme; }) pkgs.wl-clipboard (pkgs.writeScriptBin "rofi-clipboard" "cliphist list | rofi -dmenu -display-columns 2 | cliphist decode | wl-copy") ]; diff --git a/modules/home/night-light.nix b/modules/home/de/gammastep.nix similarity index 58% rename from modules/home/night-light.nix rename to modules/home/de/gammastep.nix index fdfb89b..99eaf52 100644 --- a/modules/home/night-light.nix +++ b/modules/home/de/gammastep.nix @@ -1,8 +1,8 @@ { config, lib, ... }: { - options.myConfig.night-light.enable = lib.mkEnableOption ""; + options.myConfig.de.gammastep.enable = lib.mkEnableOption ""; - config = lib.mkIf config.myConfig.night-light.enable { + config = lib.mkIf config.myConfig.de.gammastep.enable { services.gammastep = { enable = true; provider = "geoclue2"; diff --git a/modules/home/de/hyprland/default.nix b/modules/home/de/hyprland/default.nix index 0a763c6..ccdb777 100644 --- a/modules/home/de/hyprland/default.nix +++ b/modules/home/de/hyprland/default.nix @@ -14,7 +14,7 @@ wayland.windowManager.hyprland.enable = true; home.packages = [ - (wrappers.rofi { inherit (config.myConfig) theme; }) + (wrappers.rofi { inherit (config.myConfig.de) theme; }) pkgs.wl-clipboard pkgs.playerctl pkgs.brightnessctl @@ -26,6 +26,7 @@ hypridle.enable = true; waybar.enable = true; cliphist.enable = true; + gammastep.enable = true; }; services.dunst.enable = true; diff --git a/modules/home/theme.nix b/modules/home/de/theme.nix similarity index 92% rename from modules/home/theme.nix rename to modules/home/de/theme.nix index 070bd62..c6b0cc6 100644 --- a/modules/home/theme.nix +++ b/modules/home/de/theme.nix @@ -5,10 +5,10 @@ ... }: let - cfg = config.myConfig; + cfg = config.myConfig.de; in { - options.myConfig.theme = lib.mkOption { type = lib.types.str; }; + options.myConfig.de.theme = lib.mkOption { type = lib.types.str; }; config = lib.mkMerge [ (lib.mkIf ((cfg.theme == "dark") || (cfg.theme == "light")) { diff --git a/modules/home/shell/aliases.nix b/modules/home/shell/aliases.nix index 8fda9f6..57bd624 100644 --- a/modules/home/shell/aliases.nix +++ b/modules/home/shell/aliases.nix @@ -73,7 +73,7 @@ dark = ""; light = "GitHub"; } - .${config.myConfig.theme}; + .${config.myConfig.de.theme}; in { cat = "bat --plain --theme=${theme}"; diff --git a/modules/home/vscode.nix b/modules/home/vscode.nix index 1f4eaeb..1329d8c 100644 --- a/modules/home/vscode.nix +++ b/modules/home/vscode.nix @@ -36,7 +36,7 @@ dark = "GitHub Dark"; light = "GitHub Light"; } - .${config.myConfig.theme}; + .${config.myConfig.de.theme}; "workbench.iconTheme" = "material-icon-theme"; "editor.fontFamily" = "JetBrainsMono Nerd Font"; "explorer.confirmDelete" = false; diff --git a/users/seb/@inspiron/home.nix b/users/seb/@inspiron/home.nix index 91d730f..9b64c8d 100644 --- a/users/seb/@inspiron/home.nix +++ b/users/seb/@inspiron/home.nix @@ -2,7 +2,7 @@ imports = [ ../home.nix ]; home.stateVersion = "23.11"; - myConfig.theme = "light"; + myConfig.de.theme = "light"; wayland.windowManager.hyprland.settings.monitor = [ "eDP-1,1920x1080@60,0x0,1" diff --git a/users/seb/@north/home.nix b/users/seb/@north/home.nix index 09b1a50..9b3f1ee 100644 --- a/users/seb/@north/home.nix +++ b/users/seb/@north/home.nix @@ -3,7 +3,7 @@ imports = [ ../home.nix ]; home.stateVersion = "23.11"; - myConfig.theme = "dark"; + myConfig.de.theme = "dark"; home.packages = [ pkgs.ffmpeg diff --git a/users/seb/home.nix b/users/seb/home.nix index ee02777..ea28195 100644 --- a/users/seb/home.nix +++ b/users/seb/home.nix @@ -15,14 +15,13 @@ git.enable = true; vscode.enable = true; equalizer.enable = true; - night-light.enable = true; }; home.packages = [ wrappers.bottom pkgs.fastfetch - (wrappers.kitty { inherit (config.myConfig) theme; }) + (wrappers.kitty { inherit (config.myConfig.de) theme; }) wrappers.firefox pkgs.nemo-with-extensions pkgs.jetbrains.idea-community