rose-pine-nix/modules/home-manager/hyprlock.nix

25 lines
710 B
Nix
Raw Normal View History

{ config, lib, ... }:
let
inherit (config.catppuccin) sources;
cfg = config.programs.hyprlock.catppuccin;
enable = cfg.enable && config.programs.hyprlock.enable;
in
{
2024-09-21 13:28:56 -07:00
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
'')
];
};
};
}