rose-pine-nix/modules/home-manager/kitty.nix
oli f91de989e9
fix(home-manager/kitty): use new themeFile option on 24.11 (#337)
* fix(home-manager/kitty): use new `themeFile` option on 24.11

* docs: remove kitty from IFD section in faq

latest home-manager no longer uses IFD in the kitty module

* chore: update home-manager dev flake input

---------

Co-authored-by: seth <getchoo@tuta.io>
2024-09-21 16:28:29 -04:00

15 lines
529 B
Nix

{ config, lib, ... }:
let
inherit (lib) ctp;
cfg = config.programs.kitty.catppuccin;
enable = cfg.enable && config.programs.kitty.enable;
# 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";
in
{
options.programs.kitty.catppuccin = ctp.mkCatppuccinOpt { name = "kitty"; };
config = lib.mkIf enable { programs.kitty.${attrName} = "Catppuccin-${ctp.mkUpper cfg.flavor}"; };
}