2024-10-20 18:14:35 +00:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}: let
|
|
|
|
inherit (config.rose-pine) sources;
|
|
|
|
|
|
|
|
cfg = config.programs.kitty.rose-pine;
|
2023-07-13 16:17:51 +00:00
|
|
|
enable = cfg.enable && config.programs.kitty.enable;
|
2024-09-21 20:28:29 +00:00
|
|
|
|
2024-10-20 18:14:35 +00: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;
|
2023-04-15 23:46:20 +00:00
|
|
|
|
2024-10-20 18:14:35 +00:00
|
|
|
programs.kitty.settings = {
|
|
|
|
include = themePath;
|
|
|
|
};
|
|
|
|
};
|
2023-04-15 23:46:20 +00:00
|
|
|
}
|