nixos/home/modules/kitty.nix

52 lines
1.7 KiB
Nix
Raw Normal View History

2024-11-29 20:51:14 +00:00
{ lib, config, pkgs, ... }:
2024-11-24 00:04:14 +00:00
let
cfg = config.snowhawk.kitty;
macos = config.snowhawk.macos.enable;
in
{
options.snowhawk.kitty = {
enable = lib.mkEnableOption "kitty home-manager module";
};
config = lib.mkIf cfg.enable {
programs.kitty = {
enable = true;
shellIntegration.enableFishIntegration = true;
2024-12-06 20:23:33 +00:00
settings =
let
macos_fonts = {
font_family = lib.mkForce "family=\"JetBrainsMono Nerd Font Mono\" style=\"Light\"";
bold_font = lib.mkForce "family=\"JetBrainsMono Nerd Font Mono\" style=\"Regular\"";
italic_font = lib.mkForce "family=\"JetBrainsMono Nerd Font Mono\" style=\"Light Italic\"";
bold_italic_font = lib.mkForce "family=\"JetBrainsMono Nerd Font Mono\" style=\"Regular Italic\"";
};
linux_fonts = {
font_family = "family=\"JetBrainsMono Nerd Font\" style=\"ExtraLight\"";
bold_font = "family=\"JetBrainsMono Nerd Font\" style=\"Light\"";
italic_font = "family=\"JetBrainsMono Nerd Font\" style=\"ExtraLight Italic\"";
bold_italic_font = "family=\"JetBrainsMono Nerd Font\" style=\"Light Italic\"";
};
in
{
background = "#050505";
background_opacity = 0.98;
font_size = 12;
2024-11-29 03:31:39 +00:00
2024-12-06 20:23:33 +00:00
# allow_remote_control = "yes";
} // (if !macos then linux_fonts else macos_fonts);
2024-11-24 00:04:14 +00:00
2024-11-29 20:51:14 +00:00
extraConfig =
let
kitten = "${pkgs.kitty}/bin/kitten";
in
''
include ${../../home/kitty/alacritty-colors.conf}
2024-12-06 03:42:56 +00:00
# map ctrl+k ${pkgs.writeShellScript "kitten-snap" "${kitten} @ get-text --self --ansi > /tmp/test"}
2024-11-29 20:51:14 +00:00
'';
2024-11-24 00:04:14 +00:00
};
};
}