rose-pine-nix/modules/home-manager/hyprlock.nix
Weathercold 65f2a8a364
fix(home-manager/hyprland): import accents from file (#347)
Ensure accents are defined before user vars
Partially reverts 512306ae
2024-10-08 12:59:36 -04:00

24 lines
710 B
Nix

{ config, lib, ... }:
let
inherit (config.catppuccin) sources;
cfg = config.programs.hyprlock.catppuccin;
enable = cfg.enable && config.programs.hyprlock.enable;
in
{
options.programs.hyprlock.catppuccin = lib.ctp.mkCatppuccinOpt { name = "hyprlock"; } // {
accent = lib.ctp.mkAccentOpt "hyprlock";
};
config = lib.mkIf enable {
programs.hyprlock.settings = {
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
'')
];
};
};
}