Skip to content

Commit

Permalink
fix(home-manager/kitty): use new themeFile option on 24.11 (#337)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
olifloof and getchoo authored Sep 21, 2024
1 parent faea883 commit f91de98
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
6 changes: 3 additions & 3 deletions dev/flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion docs/src/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
cava.catppuccin.enable = false;
gh-dash.catppuccin.enable = false;
imv.catppuccin.enable = false;
kitty.catppuccin.enable = false; # IFD is introduced by home-manager
swaylock.catppuccin.enable = false;
};
Expand Down
6 changes: 5 additions & 1 deletion modules/home-manager/kitty.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@ 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.programs.kitty = lib.mkIf enable { theme = "Catppuccin-${ctp.mkUpper cfg.flavor}"; };
config = lib.mkIf enable { programs.kitty.${attrName} = "Catppuccin-${ctp.mkUpper cfg.flavor}"; };
}

0 comments on commit f91de98

Please sign in to comment.