30 lines
753 B
Nix
30 lines
753 B
Nix
{
|
|
config,
|
|
lib,
|
|
...
|
|
}:
|
|
let
|
|
inherit (config.rose-pine) sources;
|
|
|
|
cfg = config.wayland.windowManager.hyprland.rose-pine;
|
|
enable = cfg.enable && config.wayland.windowManager.hyprland.enable;
|
|
|
|
themeName = lib.rp.getKebabTheme cfg.flavor;
|
|
in
|
|
{
|
|
options.wayland.windowManager.hyprland.rose-pine = lib.rp.mkRosePineOpt { name = "hyprland"; } // {
|
|
accent = lib.rp.mkAccentOpt "hyprland";
|
|
};
|
|
|
|
config = lib.mkIf enable {
|
|
wayland.windowManager.hyprland.settings = {
|
|
source = [
|
|
"${sources.hyprland}/${themeName}.conf"
|
|
# Define accent in file to ensure it appears before user vars
|
|
(builtins.toFile "hyprland-${cfg.accent}-accent.conf" ''
|
|
$accent = ''$${cfg.accent}
|
|
'')
|
|
];
|
|
};
|
|
};
|
|
}
|