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

28 lines
606 B
Nix
Raw Normal View History

2024-10-20 11:14:35 -07:00
{
config,
lib,
...
}: let
inherit (config.rose-pine) sources;
cfg = config.programs.kitty.rose-pine;
enable = cfg.enable && config.programs.kitty.enable;
2024-10-20 11:14:35 -07:00
themeName =
if (cfg.flavor == "main")
then "rose-pine"
else "rose-pine-${cfg.flavor}";
themePath = "themes/${themeName}.conf";
theme = sources.kitty + "/dist/${themeName}.conf";
in {
options.programs.kitty.rose-pine = lib.rp.mkRosePineOpt {name = "kitty";};
config = lib.mkIf enable {
xdg.configFile."kitty/${themePath}".source = theme;
2024-10-20 11:14:35 -07:00
programs.kitty.settings = {
include = themePath;
};
};
}