{
  config,
  lib,
  ...
}: let
  cfg = config.chimera.terminal.kitty;
in {
  options.chimera.terminal.kitty = {
    enable = lib.mkEnableOption "the kitty terminal emulator";
    default = lib.mkOption {
      type = lib.types.bool;
      description = "Use kitty as your default terminal";
      default = true;
    };
  };

  config = lib.mkIf cfg.enable {
    home.shellAliases = lib.mkIf (!config.chimera.terminal.ghostty.enable) {
      # We can't have this set if anything except kitty is enabled, or ssh will break for non-kitty users
      # TODO: can we make a function to dynamically choose?
      ssh = "${config.programs.kitty.package}/bin/kitten ssh";
    };

    chimera.terminal.default = lib.mkIf cfg.default "${config.programs.kitty.package}/bin/kitty";

    programs.kitty = {
      enable = true;
      themeFile =
        if config.chimera.theme.catppuccin.enable then
          "Catppuccin-${config.chimera.theme.catppuccin.style}"
        else
          null;
      font = config.chimera.theme.font.mono;
      shellIntegration = {
        enableZshIntegration = config.chimera.shell.zsh.enable;
        enableBashIntegration = config.chimera.shell.bash.enable;
      };
      settings = {
        confirm_os_window_close = -1;
        symbol_map = lib.mkIf config.chimera.theme.font.nerdFontGlyphs.enable "U+23FB-U+23FE,U+2665,U+26A1,U+2B58,U+E000-U+E00A,U+E0A0-U+E0A3,U+E0B0-U+E0D4,U+E200-U+E2A9,U+E300-U+E3E3,U+E5FA-U+E6AA,U+E700-U+E7C5,U+EA60-U+EBEB,U+F000-U+F2E0,U+F300-U+F32F,U+F400-U+F4A9,U+F500-U+F8FF,U+F0001-U+F1AF0 Symbols Nerd Font Mono";
      };
    };
  };
}
