feat(home-manager): add support for kitty (#19)

This commit is contained in:
seth 2023-04-15 19:46:20 -04:00 committed by GitHub
parent 8fad8faf87
commit bdc4336b37
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 24 additions and 0 deletions

View file

@ -2,6 +2,7 @@
imports = [ imports = [
./bat.nix ./bat.nix
./bottom.nix ./bottom.nix
./kitty.nix
./starship.nix ./starship.nix
./helix.nix ./helix.nix
./gtk.nix ./gtk.nix

View file

@ -0,0 +1,23 @@
{ config, lib, ... }:
let cfg = config.programs.kitty.catppuccin;
in {
options.programs.kitty.catppuccin = with lib; {
enable = mkEnableOption "Catppuccin theme";
flavour = mkOption {
type = types.enum [ "latte" "frappe" "macchiato" "mocha" ];
default = config.catppuccin.flavour;
description = "Catppuccin flavour for kitty";
};
};
config.programs.kitty = with lib;
let
# string -> string
# this capitalizes the first letter in a string
# it's used to set the theme name correctly here
mkUpper = word:
(toUpper (substring 0 1 word)) + (substring 1 (stringLength word) word);
flavourUpper = mkUpper cfg.flavour;
in mkIf cfg.enable { theme = "Catppuccin-${flavourUpper}"; };
}