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