2024-05-21 14:53:46 -07:00
|
|
|
{ config, lib, ... }:
|
2023-07-13 09:17:51 -07:00
|
|
|
let
|
|
|
|
inherit (lib) ctp;
|
|
|
|
cfg = config.programs.kitty.catppuccin;
|
|
|
|
enable = cfg.enable && config.programs.kitty.enable;
|
2024-09-21 13:28:29 -07:00
|
|
|
|
|
|
|
# TODO: Remove after 24.11 is stable
|
|
|
|
# https://github.com/nix-community/home-manager/pull/5750
|
|
|
|
attrName = if (lib.versionAtLeast ctp.getModuleRelease "24.11") then "themeFile" else "theme";
|
2023-07-13 09:17:51 -07:00
|
|
|
in
|
|
|
|
{
|
2024-06-28 09:29:30 -07:00
|
|
|
options.programs.kitty.catppuccin = ctp.mkCatppuccinOpt { name = "kitty"; };
|
2023-04-15 16:46:20 -07:00
|
|
|
|
2024-09-21 13:28:29 -07:00
|
|
|
config = lib.mkIf enable { programs.kitty.${attrName} = "Catppuccin-${ctp.mkUpper cfg.flavor}"; };
|
2023-04-15 16:46:20 -07:00
|
|
|
}
|