From 57432a9655640f37287b297101b0eb733bfc8c44 Mon Sep 17 00:00:00 2001 From: Anthony Rodriguez Date: Fri, 17 Jan 2025 12:13:54 +0100 Subject: [PATCH] treewide: move regreet styling out of module --- modules/nix/services/greetd.nix | 28 ++++++++++++++++++++++----- modules/nix/style/modules/regreet.nix | 21 -------------------- 2 files changed, 23 insertions(+), 26 deletions(-) delete mode 100644 modules/nix/style/modules/regreet.nix diff --git a/modules/nix/services/greetd.nix b/modules/nix/services/greetd.nix index df70a0d..81df572 100644 --- a/modules/nix/services/greetd.nix +++ b/modules/nix/services/greetd.nix @@ -1,8 +1,8 @@ { - config, - inputs, lib, + inputs, pkgs, + config, ... }: # thanks https://git.jacekpoz.pl/poz/niksos/src/commit/f8d5e7ccd9c769f7c0b564f10dff419285e75248/modules/services/greetd.nix @@ -10,6 +10,8 @@ let inherit (lib) getExe getExe'; inherit (inputs.hyprland.packages.${pkgs.stdenv.system}) hyprland; + styleCfg = config.local.style; + hyprctl = getExe' hyprland "hyprctl"; Hyprland = getExe' hyprland "Hyprland"; @@ -46,9 +48,25 @@ in { }; }; - programs.regreet = { - enable = true; - }; + programs.regreet = lib.mkMerge [ + { + enable = true; + } + + (lib.mkIf styleCfg.enable { + theme = { + inherit (styleCfg.gtk.theme) name package; + }; + + cursorTheme = { + inherit (styleCfg.cursorTheme) name package; + }; + + iconTheme = { + inherit (styleCfg.gtk.iconTheme) name package; + }; + }) + ]; security.pam.services = { greetd.enableGnomeKeyring = true; diff --git a/modules/nix/style/modules/regreet.nix b/modules/nix/style/modules/regreet.nix deleted file mode 100644 index 1fb8866..0000000 --- a/modules/nix/style/modules/regreet.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ - lib, - config, - ... -}: let - cfg = config.local.style; -in { - config.programs.regreet = lib.mkIf cfg.enable { - theme = { - inherit (cfg.gtk.theme) name package; - }; - - cursorTheme = { - inherit (cfg.cursorTheme) name package; - }; - - iconTheme = { - inherit (cfg.gtk.iconTheme) name package; - }; - }; -}