rose-pine-nix/modules/home-manager/hyprland.nix
2024-05-21 22:53:46 +01:00

21 lines
646 B
Nix

{ config, lib, ... }:
let
inherit (config.catppuccin) sources;
cfg = config.wayland.windowManager.hyprland.catppuccin;
enable = cfg.enable && config.wayland.windowManager.hyprland.enable;
in
{
options.wayland.windowManager.hyprland.catppuccin = lib.ctp.mkCatppuccinOpt "hyprland" // {
accent = lib.ctp.mkAccentOpt "hyprland";
};
config.wayland.windowManager.hyprland.settings = lib.mkIf enable {
source = [
"${sources.hyprland}/themes/${cfg.flavour}.conf"
(builtins.toFile "hyprland-${cfg.accent}-accent.conf" ''
$accent=''$${cfg.accent}
$accentAlpha=''$${cfg.accent}Alpha
'')
];
};
}