From a4fb9a83d671a4c7f3ed44df77cdee36604b5411 Mon Sep 17 00:00:00 2001 From: Arpit Chakladar <54011232+arpitchakladar@users.noreply.github.com> Date: Tue, 15 Oct 2024 04:21:26 +0530 Subject: Refactoring code. Stopped using picom. Disabled unused packages and configurations. --- home.nix | 12 +++--- modules/desktop/application-launcher/default.nix | 1 - .../desktop/application-launcher/fzf/default.nix | 6 +-- .../desktop/application-launcher/rofi/default.nix | 7 ++-- modules/desktop/default.nix | 2 +- .../display-server/compositor/picom/default.nix | 3 +- .../desktop/display-server/x11/xinit/default.nix | 7 +--- modules/desktop/status-bar/polybar/bar/default.nix | 5 +++ modules/desktop/status-bar/polybar/bar/main.nix | 8 ++-- modules/desktop/status-bar/polybar/default.nix | 20 ++-------- .../desktop/status-bar/polybar/module/default.nix | 16 ++++++++ modules/desktop/window-manager/sxhkd/default.nix | 38 +++++++++---------- .../window-manager/sxhkd/keybindings/bspwm.nix | 44 +++++++++++----------- modules/desktop/xdg-portal/default.nix | 24 ------------ modules/desktop/xdg/default.nix | 24 ++++++++++++ modules/fonts/default.nix | 3 ++ modules/fonts/nerdfont/fira-code/default.nix | 1 + modules/shell/bash/default.nix | 10 ++--- modules/shell/zsh/default.nix | 6 +-- modules/tools/editor/neovim/default.nix | 4 +- .../tools/editor/neovim/plugins/config/default.nix | 4 +- modules/tools/editor/neovim/plugins/default.nix | 2 +- modules/tools/file-manager/lf/default.nix | 6 +-- modules/tools/file-manager/nnn/default.nix | 6 +-- modules/tools/terminal/alacritty/default.nix | 6 +-- modules/tools/terminal/kitty/default.nix | 6 +-- 26 files changed, 141 insertions(+), 130 deletions(-) create mode 100644 modules/desktop/status-bar/polybar/bar/default.nix create mode 100644 modules/desktop/status-bar/polybar/module/default.nix delete mode 100644 modules/desktop/xdg-portal/default.nix create mode 100644 modules/desktop/xdg/default.nix diff --git a/home.nix b/home.nix index ab5287d..a4794c1 100644 --- a/home.nix +++ b/home.nix @@ -7,14 +7,14 @@ # Desktop desktop.display-server.x11.xinit.enable = true; - # desktop.application-launcher.rofi.enable = true; + desktop.application-launcher.rofi.enable = false; desktop.application-launcher.fzf.enable = true; desktop.application-launcher.default = "fzf"; - desktop.display-server.compositor.picom.enable = true; + desktop.display-server.compositor.picom.enable = false; desktop.status-bar.polybar.enable = true; desktop.window-manager.bspwm.enable = true; desktop.window-manager.sxhkd.enable = true; - desktop.xdg-portal.enable = true; + desktop.xdg.portal.enable = false; # Fonts fonts.nerdfont.fira-code.enable = true; @@ -26,8 +26,8 @@ # Tools tools.editor.neovim.enable = true; - tools.editor.neovim.configuration = "full"; - tools.file-manager.lf.enable = true; + tools.editor.neovim.profile = "full"; + tools.file-manager.lf.enable = false; tools.file-manager.nnn.enable = true; tools.file-manager.default = "nnn"; tools.file-manager.lsd.enable = true; @@ -36,7 +36,7 @@ tools.git.email = "54011232+arpitchakladar@users.noreply.github.com"; tools.system-monitor.htop.enable = true; tools.terminal.alacritty.enable = true; - # tools.terminal.kitty.enable = true; + tools.terminal.kitty.enable = false; tools.terminal.default = "alacritty"; tools.utils.fzf.enable = true; tools.viewer.bat.enable = true; diff --git a/modules/desktop/application-launcher/default.nix b/modules/desktop/application-launcher/default.nix index 3abb908..012deb5 100644 --- a/modules/desktop/application-launcher/default.nix +++ b/modules/desktop/application-launcher/default.nix @@ -12,7 +12,6 @@ "fzf" "rofi" ]; - description = "Select the default application launcher."; }; diff --git a/modules/desktop/application-launcher/fzf/default.nix b/modules/desktop/application-launcher/fzf/default.nix index 6a1c4a6..a7d12d3 100644 --- a/modules/desktop/application-launcher/fzf/default.nix +++ b/modules/desktop/application-launcher/fzf/default.nix @@ -15,8 +15,8 @@ desktop.application-launcher.default = lib.mkDefault "fzf"; desktop.application-launcher.command = - if config.desktop.application-launcher.default == "fzf" then - lib.mkForce "${config.tools.terminal.command} --title 'Application Launcher' --class floating-termial -e ${(pkgs.writeShellScript "fzf-launch.sh" (builtins.readFile ./launch.sh))}" - else ""; + lib.mkIf + (config.desktop.application-launcher.default == "fzf") + "${config.tools.terminal.command} --title 'Application Launcher' --class floating-termial -e ${(pkgs.writeShellScript "fzf-launch.sh" (builtins.readFile ./launch.sh))}"; }; } diff --git a/modules/desktop/application-launcher/rofi/default.nix b/modules/desktop/application-launcher/rofi/default.nix index 58a64a4..bfdd617 100644 --- a/modules/desktop/application-launcher/rofi/default.nix +++ b/modules/desktop/application-launcher/rofi/default.nix @@ -8,9 +8,10 @@ config = lib.mkIf config.desktop.application-launcher.rofi.enable { desktop.application-launcher.default = lib.mkDefault "rofi"; desktop.application-launcher.command = - if config.desktop.application-launcher.default == "rofi" then - lib.mkForce "${pkgs.rofi}/bin/rofi -show run" - else ""; + lib.mkIf + (config.desktop.application-launcher.default == "rofi") + "${pkgs.rofi}/bin/rofi -show run"; + programs.rofi.enable = true; programs.rofi.font = "${config.fonts.normal} ${toString config.fonts.size}"; programs.rofi.theme = config.scheme { diff --git a/modules/desktop/default.nix b/modules/desktop/default.nix index e015ea9..edb8959 100644 --- a/modules/desktop/default.nix +++ b/modules/desktop/default.nix @@ -6,6 +6,6 @@ ./display-server ./status-bar ./window-manager - ./xdg-portal + ./xdg ]; } diff --git a/modules/desktop/display-server/compositor/picom/default.nix b/modules/desktop/display-server/compositor/picom/default.nix index f138793..750fd1e 100644 --- a/modules/desktop/display-server/compositor/picom/default.nix +++ b/modules/desktop/display-server/compositor/picom/default.nix @@ -13,11 +13,12 @@ services.picom.settings = { blur-background = false; background = "#000000"; + transparent-clipping = true; }; services.picom.activeOpacity = 0.8; services.picom.inactiveOpacity = 0.8; services.picom.opacityRules = [ - "70:class_g = 'Polybar'" # 70% opacity for Polybar + "100:class_g = 'Polybar'" # 70% opacity for Polybar ]; }; } diff --git a/modules/desktop/display-server/x11/xinit/default.nix b/modules/desktop/display-server/x11/xinit/default.nix index d2a59f7..7078ca2 100644 --- a/modules/desktop/display-server/x11/xinit/default.nix +++ b/modules/desktop/display-server/x11/xinit/default.nix @@ -8,16 +8,13 @@ config = lib.mkIf config.desktop.display-server.x11.xinit.enable { home.file.".xinitrc" = { executable = true; + source = pkgs.writeText ".xinitrc" '' #!/bin/sh -xsetroot -solid "${config.scheme.withHashtag.base00}" -${if config.desktop.display-server.compositor.picom.enable then - "picom &" -else ""} ${if config.tools.viewer.feh.enable then "feh --bg-scale ${../../../../../assets/skeleton-mage.png}" -else ""} +else "xsetroot -solid \"${config.scheme.withHashtag.base00}\""} ${if config.desktop.status-bar.polybar.enable then config.desktop.status-bar.polybar.command else ""} diff --git a/modules/desktop/status-bar/polybar/bar/default.nix b/modules/desktop/status-bar/polybar/bar/default.nix new file mode 100644 index 0000000..23a43c4 --- /dev/null +++ b/modules/desktop/status-bar/polybar/bar/default.nix @@ -0,0 +1,5 @@ +{ config, lib }: + +{ + "bar/main" = import ./main.nix { inherit config lib; }; +} diff --git a/modules/desktop/status-bar/polybar/bar/main.nix b/modules/desktop/status-bar/polybar/bar/main.nix index 660c444..25cce91 100644 --- a/modules/desktop/status-bar/polybar/bar/main.nix +++ b/modules/desktop/status-bar/polybar/bar/main.nix @@ -1,4 +1,4 @@ -{ config }: +{ config, lib }: with config.scheme.withHashtag; let @@ -36,9 +36,9 @@ in { font-2 = "${config.fonts.normal}:style=Light:pixelsize=${largerFontSize};2"; modules-left = - if config.desktop.window-manager.bspwm.enable then - "bspwm separator" - else null; + lib.mkIf + config.desktop.window-manager.bspwm.enable + "bspwm separator"; modules-center = "xwindow"; modules-right = "separator memory cpu battery time date kernel-version"; } diff --git a/modules/desktop/status-bar/polybar/default.nix b/modules/desktop/status-bar/polybar/default.nix index 05fb79a..0ea66c7 100644 --- a/modules/desktop/status-bar/polybar/default.nix +++ b/modules/desktop/status-bar/polybar/default.nix @@ -20,21 +20,9 @@ POLYBAR_WIDTH=$((MONITOR_WIDTH - 2 * OFFSET)) POLYBAR_OFFSET=$OFFSET polybar mai config = lib.mkIf config.desktop.status-bar.polybar.enable { services.polybar.enable = true; services.polybar.script = config.desktop.status-bar.polybar.command; - - services.polybar.config = { - "bar/main" = import ./bar/main.nix { inherit config; }; - "module/separator" = import ./module/separator.nix { inherit config; }; - "module/xwindow" = import ./module/xwindow.nix { inherit config; }; - "module/bspwm" = - if config.desktop.window-manager.bspwm.enable then - import ./module/bspwm.nix { inherit config; } - else null; - "module/cpu" = import ./module/cpu.nix { inherit config; }; - "module/memory" = import ./module/memory.nix { inherit config; }; - "module/date" = import ./module/date.nix { inherit config; }; - "module/time" = import ./module/time.nix { inherit config; }; - "module/battery" = import ./module/battery.nix { inherit config; }; - "module/kernel-version" = import ./module/kernel-version.nix { inherit config; }; - }; + services.polybar.config = lib.mkMerge [ + (import ./bar { inherit config lib; }) + (import ./module { inherit config lib; }) + ]; }; } diff --git a/modules/desktop/status-bar/polybar/module/default.nix b/modules/desktop/status-bar/polybar/module/default.nix new file mode 100644 index 0000000..3444086 --- /dev/null +++ b/modules/desktop/status-bar/polybar/module/default.nix @@ -0,0 +1,16 @@ +{ config, lib }: + +{ + "module/separator" = import ./separator.nix { inherit config; }; + "module/xwindow" = import ./xwindow.nix { inherit config; }; + "module/bspwm" = + lib.mkIf + config.desktop.window-manager.bspwm.enable + (import ./bspwm.nix { inherit config; }); + "module/cpu" = import ./cpu.nix { inherit config; }; + "module/memory" = import ./memory.nix { inherit config; }; + "module/date" = import ./date.nix { inherit config; }; + "module/time" = import ./time.nix { inherit config; }; + "module/battery" = import ./battery.nix { inherit config; }; + "module/kernel-version" = import ./kernel-version.nix { inherit config; }; +} diff --git a/modules/desktop/window-manager/sxhkd/default.nix b/modules/desktop/window-manager/sxhkd/default.nix index 953cfd3..f4678c3 100644 --- a/modules/desktop/window-manager/sxhkd/default.nix +++ b/modules/desktop/window-manager/sxhkd/default.nix @@ -11,36 +11,36 @@ services.sxhkd.keybindings = let modKey = "alt"; - createKeybinding = keybinding: description: "# ${description}\n${modKey} + ${keybinding}"; + createKeybinding = keybinding: description: command: { + "# ${description}\n${modKey} + ${keybinding}" = command; + }; in lib.mkMerge [ ( if config.desktop.window-manager.bspwm.enable then - (import ./keybindings/bspwm.nix { inherit pkgs createKeybinding; }) + (import ./keybindings/bspwm.nix { inherit pkgs createKeybinding lib; }) else {} ) - { - ${(createKeybinding + (lib.mkMerge [ + (createKeybinding "s" - "Show keybindings.")} - = pkgs.writeShellScript - "keybindings.sh" - (builtins.readFile ./scripts/keybindings.sh); + "Show keybindings." + (pkgs.writeShellScript "keybindings.sh" (builtins.readFile ./scripts/keybindings.sh))) - ${(createKeybinding - "r" - "Application launcher.")} - = config.desktop.application-launcher.command; + (createKeybinding + "space" + "Application launcher." + config.desktop.application-launcher.command) - ${(createKeybinding + (createKeybinding "t" - "Launch terminal.")} - = config.tools.terminal.command; + "Launch terminal." + config.tools.terminal.command) - ${(createKeybinding + (createKeybinding "f" - "Launch File Manager.")} - = "${config.tools.terminal.command} --title 'File Manager' --class floating-termial -e ${config.tools.file-manager.command}"; - } + "Launch File Manager." + "${config.tools.terminal.command} --title 'File Manager' --class floating-termial -e ${config.tools.file-manager.command}") + ]) ]; }; } diff --git a/modules/desktop/window-manager/sxhkd/keybindings/bspwm.nix b/modules/desktop/window-manager/sxhkd/keybindings/bspwm.nix index 1d66d16..ed62ed4 100644 --- a/modules/desktop/window-manager/sxhkd/keybindings/bspwm.nix +++ b/modules/desktop/window-manager/sxhkd/keybindings/bspwm.nix @@ -1,38 +1,38 @@ -{ createKeybinding, pkgs }: +{ createKeybinding, pkgs, lib }: let bspc = "${pkgs.bspwm}/bin/bspc"; -in { - ${(createKeybinding +in lib.mkMerge [ + (createKeybinding "q" - "Kill current window.")} - = "${bspc} node -c"; + "Kill current window." + "${bspc} node -c") - ${(createKeybinding + (createKeybinding "{1-9,0}" - "Switch workspace.")} - = "${bspc} desktop -f {1-9,10}"; + "Switch workspace." + "${bspc} desktop -f {1-9,10}") - ${(createKeybinding + (createKeybinding "shift + {1-9,0}" - "Move window to workspace.")} - = "${bspc} node -d {1-9,10} --follow"; + "Move window to workspace." + "${bspc} node -d {1-9,10} --follow") - ${(createKeybinding + (createKeybinding "{n,d,m}" - "Set current window mode (tiled, floating, fullscreen).")} - = "${bspc} node focused -t {tiled,floating,fullscreen}"; + "Set current window mode (tiled, floating, fullscreen)." + "${bspc} node focused -t {tiled,floating,fullscreen}") - ${(createKeybinding + (createKeybinding "{_,shift + }{h,j,k,l}" - "Navigate between windows.")} - = "${bspc} node --{focus,swap} {west,south,north,east}"; + "Navigate between windows." + "${bspc} node --{focus,swap} {west,south,north,east}") # the indentation for each line is required to work with the help prompt - ${(createKeybinding + (createKeybinding "ctrl + {h,j,k,l}" - "Resize current window.")} - = '' + "Resize current window." + '' ${bspc} node {@parent/second -z left -20 0; \ @parent/first -z right -20 0, \ @parent/second -z top 0 +20; \ @@ -41,5 +41,5 @@ in { @parent/second -z top 0 -20, \ @parent/first -z right +20 0; \ @parent/second -z left +20 0} -''; -} +'') +] diff --git a/modules/desktop/xdg-portal/default.nix b/modules/desktop/xdg-portal/default.nix deleted file mode 100644 index a3681ef..0000000 --- a/modules/desktop/xdg-portal/default.nix +++ /dev/null @@ -1,24 +0,0 @@ -{ pkgs, config, lib, ... }: - -{ - options.desktop.xdg-portal = { - enable = lib.mkEnableOption "Enables xdg desktop portal."; - }; - - config = lib.mkIf config.desktop.xdg-portal.enable { - xdg.portal.enable = true; - xdg.portal.xdgOpenUsePortal = true; - - xdg.portal.config = { - common = { - default = [ - "gtk" - ]; - }; - }; - - xdg.portal.extraPortals = [ - pkgs.xdg-desktop-portal-gtk - ]; - }; -} diff --git a/modules/desktop/xdg/default.nix b/modules/desktop/xdg/default.nix new file mode 100644 index 0000000..a1614f4 --- /dev/null +++ b/modules/desktop/xdg/default.nix @@ -0,0 +1,24 @@ +{ pkgs, config, lib, ... }: + +{ + options.desktop.xdg = { + portal.enable = lib.mkEnableOption "Enables xdg desktop portal."; + }; + + config = lib.mkIf config.desktop.xdg.portal.enable { + xdg.portal.enable = true; + xdg.portal.xdgOpenUsePortal = true; + + xdg.portal.config = { + common = { + default = [ + "gtk" + ]; + }; + }; + + xdg.portal.extraPortals = [ + pkgs.xdg-desktop-portal-gtk + ]; + }; +} diff --git a/modules/fonts/default.nix b/modules/fonts/default.nix index efb8802..c5d552c 100644 --- a/modules/fonts/default.nix +++ b/modules/fonts/default.nix @@ -10,16 +10,19 @@ type = lib.types.str; description = "Default normal font name."; }; + bold = lib.mkOption { type = lib.types.str; description = "Default bold font name."; default = config.fonts.normal; }; + italic = lib.mkOption { type = lib.types.str; description = "Default italic font name."; default = config.fonts.normal; }; + size = lib.mkOption { type = lib.types.int; description = "Default font size."; diff --git a/modules/fonts/nerdfont/fira-code/default.nix b/modules/fonts/nerdfont/fira-code/default.nix index 94381b4..f354c9f 100644 --- a/modules/fonts/nerdfont/fira-code/default.nix +++ b/modules/fonts/nerdfont/fira-code/default.nix @@ -7,6 +7,7 @@ config = lib.mkIf config.fonts.nerdfont.fira-code.enable { fonts.normal = lib.mkDefault "Fira Code Nerd Font"; + home.packages = with pkgs; [ (nerdfonts.override { fonts = [ diff --git a/modules/shell/bash/default.nix b/modules/shell/bash/default.nix index 9a81d7a..b845ced 100644 --- a/modules/shell/bash/default.nix +++ b/modules/shell/bash/default.nix @@ -12,9 +12,9 @@ config = lib.mkIf config.shell.bash.enable { shell.default = lib.mkDefault "bash"; shell.command = - if config.shell.default == "bash" then - lib.mkForce "${pkgs.zsh}/bin/bash" - else ""; + lib.mkIf + (config.shell.default == "bash") + "${pkgs.zsh}/bin/bash"; programs.bash.enable = true; programs.bash.historyFile = "${config.xdg.cacheHome}/bash/history"; @@ -25,8 +25,8 @@ ${if config.tools.utils.fzf.enable then else ""} ''; - home.activation.createBashCacheDirectory - = lib.hm.dag.entryAfter + home.activation.createBashCacheDirectory = + lib.hm.dag.entryAfter [ "writeBoundary" ] "mkdir -p ${config.xdg.cacheHome}/bash"; }; diff --git a/modules/shell/zsh/default.nix b/modules/shell/zsh/default.nix index 9dd762d..d599196 100644 --- a/modules/shell/zsh/default.nix +++ b/modules/shell/zsh/default.nix @@ -8,9 +8,9 @@ config = lib.mkIf config.shell.zsh.enable { shell.default = lib.mkDefault "zsh"; shell.command = - if config.shell.default == "zsh" then - lib.mkForce "${pkgs.zsh}/bin/zsh" - else ""; + lib.mkIf + (config.shell.default == "zsh") + "${pkgs.zsh}/bin/zsh"; programs.zsh.enable = true; programs.zsh.dotDir = ".config/zsh"; diff --git a/modules/tools/editor/neovim/default.nix b/modules/tools/editor/neovim/default.nix index 64f2600..7d257ba 100644 --- a/modules/tools/editor/neovim/default.nix +++ b/modules/tools/editor/neovim/default.nix @@ -3,13 +3,13 @@ { options.tools.editor.neovim = { enable = lib.mkEnableOption "Enables neovim."; - configuration = lib.mkOption { + profile = lib.mkOption { type = lib.types.enum [ "minimal" "full" ]; default = "minimal"; - description = "The configuration for neovim to use."; + description = "The profile for neovim to use."; }; }; diff --git a/modules/tools/editor/neovim/plugins/config/default.nix b/modules/tools/editor/neovim/plugins/config/default.nix index bf8b0ef..cfc54cb 100644 --- a/modules/tools/editor/neovim/plugins/config/default.nix +++ b/modules/tools/editor/neovim/plugins/config/default.nix @@ -1,7 +1,7 @@ { config }: let - extra = if config.tools.editor.neovim.configuration == "full" then + fullExtra = if config.tools.editor.neovim.profile == "full" then '' ${builtins.readFile ./lsp-config.lua} ${builtins.readFile ./dressing.lua} @@ -21,5 +21,5 @@ ${builtins.readFile (config.scheme { template = builtins.readFile ./base16.mustache.lua; })} ${builtins.readFile ./nvim-tree.lua} -${extra} +${fullExtra} '' diff --git a/modules/tools/editor/neovim/plugins/default.nix b/modules/tools/editor/neovim/plugins/default.nix index 61c046c..7081bda 100644 --- a/modules/tools/editor/neovim/plugins/default.nix +++ b/modules/tools/editor/neovim/plugins/default.nix @@ -15,7 +15,7 @@ patchPhase = "ln -s ${config.scheme base16-vim} colors/base16-scheme.vim"; })) ] - (if config.tools.editor.neovim.configuration == "full" then + (if config.tools.editor.neovim.profile == "full" then [ noice-nvim dressing-nvim diff --git a/modules/tools/file-manager/lf/default.nix b/modules/tools/file-manager/lf/default.nix index 755ccd7..2fab997 100644 --- a/modules/tools/file-manager/lf/default.nix +++ b/modules/tools/file-manager/lf/default.nix @@ -8,9 +8,9 @@ config = lib.mkIf config.tools.file-manager.lf.enable { tools.file-manager.default = lib.mkDefault "lf"; tools.file-manager.command = - if config.tools.file-manager.default == "lf" then - lib.mkForce "${pkgs.lf}/bin/lf" - else ""; + lib.mkIf + (config.tools.file-manager.default == "lf") + "${pkgs.lf}/bin/lf"; programs.lf.enable = true; programs.lf.settings = { diff --git a/modules/tools/file-manager/nnn/default.nix b/modules/tools/file-manager/nnn/default.nix index 7426153..a41096c 100644 --- a/modules/tools/file-manager/nnn/default.nix +++ b/modules/tools/file-manager/nnn/default.nix @@ -11,9 +11,9 @@ in lib.mkIf config.tools.file-manager.nnn.enable { tools.file-manager.default = lib.mkDefault "nnn"; tools.file-manager.command = - if config.tools.file-manager.default == "nnn" then - lib.mkForce "${nnnWithNerdIcons}/bin/nnn -H -d" - else ""; + lib.mkIf + (config.tools.file-manager.default == "nnn") + "${nnnWithNerdIcons}/bin/nnn -H -d"; programs.nnn.enable = true; programs.nnn.package = nnnWithNerdIcons; diff --git a/modules/tools/terminal/alacritty/default.nix b/modules/tools/terminal/alacritty/default.nix index 8f0aaf4..fa3c080 100644 --- a/modules/tools/terminal/alacritty/default.nix +++ b/modules/tools/terminal/alacritty/default.nix @@ -9,9 +9,9 @@ programs.alacritty.enable = true; tools.terminal.default = lib.mkDefault "alacritty"; tools.terminal.command = - if config.tools.terminal.default == "alacritty" then - lib.mkForce "${pkgs.alacritty}/bin/alacritty" - else ""; + lib.mkIf + (config.tools.terminal.default == "alacritty") + "${pkgs.alacritty}/bin/alacritty"; programs.alacritty.settings = { window = { diff --git a/modules/tools/terminal/kitty/default.nix b/modules/tools/terminal/kitty/default.nix index 5508feb..0cb49d8 100644 --- a/modules/tools/terminal/kitty/default.nix +++ b/modules/tools/terminal/kitty/default.nix @@ -15,9 +15,9 @@ programs.kitty.enable = true; tools.terminal.default = lib.mkDefault "kitty"; tools.terminal.command = - if config.tools.terminal.default == "kitty" then - lib.mkForce "${pkgs.kitty}/bin/kitty" - else ""; + lib.mkIf + (config.tools.terminal.default == "kitty") + "${pkgs.kitty}/bin/kitty"; programs.kitty.settings = with config.scheme.withHashtag; { window_padding_width = config.desktop.window-manager.gap; -- cgit v1.2.3