1
0
Fork 0
nix-config/modules/home/apps/kitty/default.nix

43 lines
924 B
Nix

{
config,
lib,
pkgs,
namespace,
...
}:
with lib;
with lib.${namespace};
let
cfg = config.${namespace}.apps.kitty;
defaultSettings = {
confirm_os_window_close = 0;
mouse_hide_wait = "-1.0";
dynamic_background_opacity = true;
editor = "nvim";
term = "xterm-256color";
adjust_line_height = 3;
copy_on_select = "clipboard";
cursor_shape = "Beam";
};
defaultFont = {
name = "Hack Nerd Font Mono";
package = pkgs.nerdfonts;
size = 12;
};
in
{
options.${namespace}.apps.kitty = with types; {
enable = mkBoolOpt false "Whether or not to enable kitty.";
settings = mkOpt attrs defaultSettings "Settings to apply to the profile.";
font = mkOpt attrs defaultFont "Customize default font settings.";
};
config = mkIf cfg.enable {
programs.kitty = {
enable = true;
themeFile = "Dracula";
inherit (cfg) font settings;
};
};
}