nixos/modules/home/apps/kitty/default.nix

45 lines
1.1 KiB
Nix
Raw Normal View History

2024-05-25 00:37:37 +02:00
{ config, pkgs, lib, ... }:
with lib;
let
2024-05-27 22:23:32 +02:00
cfg = config.homeModules.apps.kitty;
2024-05-25 00:37:37 +02:00
in
{
2024-05-27 22:23:32 +02:00
options.homeModules.apps.kitty = {
2024-05-25 00:37:37 +02:00
enable = mkEnableOption ''
Enable kitty with my custom configurations
'';
enableBlur = mkOption {
2024-05-27 22:23:32 +02:00
default = !config.homeModules.desktop.hyprland.enable; # Disable by default if hyprland is enabled (Hyprland enable own blur)
2024-05-25 00:37:37 +02:00
example = true;
description = ''
Enable blur (Usefull to disable with hyprland)
'';
type = types.bool;
};
};
config = mkIf cfg.enable {
programs.kitty = {
enable = true;
font = {
name = "FiraCode Nerd Font";
package = pkgs.fira-code-nerdfont;
};
settings = lib.mkMerge [
{
disable_ligatures = "never";
sync_to_monitor = "yes"; # Avoid to update a lot
confirm_os_window_close = 0; # Disable close confirmation
background_opacity = "0.7";
}
(lib.mkIf cfg.enableBlur { background_blur = "1"; })
(lib.mkIf config.programs.zsh.enable { shell = "zsh"; })
];
};
};
}