diff --git a/modules/home-manager/hyprlock.nix b/modules/home-manager/hyprlock.nix index dcf42d0e..37ca432f 100644 --- a/modules/home-manager/hyprlock.nix +++ b/modules/home-manager/hyprlock.nix @@ -11,9 +11,14 @@ in config = lib.mkIf enable { programs.hyprlock.settings = { - source = [ "${sources.hyprland}/themes/${cfg.flavor}.conf" ]; - "$accent" = "\$${cfg.accent}"; - "$accentAlpha" = "\$${cfg.accent}Alpha"; + source = [ + "${sources.hyprland}/themes/${cfg.flavor}.conf" + # Define accents in file to ensure they appear before user vars + (builtins.toFile "hyprland-${cfg.accent}-accent.conf" '' + $accent = ''$${cfg.accent} + $accentAlpha = ''$${cfg.accent}Alpha + '') + ]; }; }; }