From e7b79879bd8c5a4a772a40e7357b9fd73474cc81 Mon Sep 17 00:00:00 2001 From: Florian RICHER Date: Mon, 6 May 2024 00:29:28 +0200 Subject: [PATCH] Add autoconfigure kitty with hyprland --- home/homePrograms/kitty.nix | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/home/homePrograms/kitty.nix b/home/homePrograms/kitty.nix index 850b7d6..7b1fc6e 100644 --- a/home/homePrograms/kitty.nix +++ b/home/homePrograms/kitty.nix @@ -2,13 +2,23 @@ with lib; { options.homePrograms.kitty = { - enable = mkEnableOption '' - Enable kitty with my custom configurations - ''; + enable = mkOption { + default = config.homePrograms.hyprland.enable; # Enable by default with hyprland to ensure kitty is installed with hyprland + example = true; + description = '' + Enable kitty with my custom configurations + ''; + type = types.bool; + }; - enableBlur = mkEnableOption '' - Enable blur (Usefull to disable with hyprland) - ''; + enableBlur = mkOption { + default = !config.homePrograms.hyprland.enable; # Disable by default if hyprland is enabled (Hyprland enable own blur) + example = true; + description = '' + Enable blur (Usefull to disable with hyprland) + ''; + type = types.bool; + }; }; config = let @@ -25,7 +35,6 @@ with lib; settings = lib.mkMerge [ { - shell = "zsh"; disable_ligatures = "never"; sync_to_monitor = "yes"; # Avoid to update a lot confirm_os_window_close = 0; # Disable close confirmation @@ -34,6 +43,7 @@ with lib; } (lib.mkIf cfg.enableBlur { background_blur = "1"; }) + (lib.mkIf config.programs.zsh.enable { shell = "zsh"; }) ]; }; };