From fb442560064f98ee850c71d78330b9b3abda4774 Mon Sep 17 00:00:00 2001 From: Arpit Chakladar Date: Sun, 20 Sep 2026 04:00:07 +0530 Subject: chore: added option guards to desktop entries for tuis --- modules/system/btop/default.nix | 43 +++++++++++++++++--------------- modules/system/systemctl-tui/default.nix | 35 ++++++++++++++------------ 2 files changed, 42 insertions(+), 36 deletions(-) (limited to 'modules/system') diff --git a/modules/system/btop/default.nix b/modules/system/btop/default.nix index 1f9a8d6..40f878f 100644 --- a/modules/system/btop/default.nix +++ b/modules/system/btop/default.nix @@ -21,24 +21,27 @@ }; }; - config = lib.mkIf config.system.btop.enable { - programs.btop = { - enable = true; - package = config.system.btop.package; - }; - - xdg.desktopEntries."btop" = lib.mkIf config.terminal.kitty.enable { - name = "btop++"; - exec = "${lib.getExe config.terminal.kitty.package} --class btop -e ${lib.getExe config.system.btop.package}"; - icon = "btop"; - categories = [ - "System" - "Monitor" - "ConsoleOnly" - ]; - comment = "Cross-platform graphical process and system monitor"; - terminal = false; - type = "Application"; - }; - }; + config = lib.mkMerge [ + (lib.mkIf config.system.btop.enable { + programs.btop = { + enable = true; + package = config.system.btop.package; + }; + }) + (lib.mkIf (config.system.btop.enable && config.terminal.kitty.enable) { + xdg.desktopEntries."btop" = { + name = "btop++"; + exec = "${lib.getExe config.terminal.kitty.package} --class btop -e ${lib.getExe config.system.btop.package}"; + icon = "btop"; + categories = [ + "System" + "Monitor" + "ConsoleOnly" + ]; + comment = "Cross-platform graphical process and system monitor"; + terminal = false; + type = "Application"; + }; + }) + ]; } diff --git a/modules/system/systemctl-tui/default.nix b/modules/system/systemctl-tui/default.nix index 7483db6..17b7ec4 100644 --- a/modules/system/systemctl-tui/default.nix +++ b/modules/system/systemctl-tui/default.nix @@ -16,21 +16,24 @@ }; }; - config = lib.mkIf config.system.systemctl-tui.enable { - home.file.".local/share/icons/hicolor/scalable/apps/systemd.svg" = { - source = ../../../assets/icons/apps/systemd.svg; - }; - - xdg.desktopEntries."systemctl-tui" = { - name = "systemctl-tui"; - exec = "${lib.getExe config.terminal.kitty.package} --class systemctl-tui -e ${lib.getExe config.system.systemctl-tui.package}"; - icon = "systemd"; - categories = [ "System" ]; - comment = "TUI for systemctl"; - terminal = false; - type = "Application"; - }; + config = lib.mkMerge [ + (lib.mkIf config.system.systemctl-tui.enable { + home.file.".local/share/icons/hicolor/scalable/apps/systemd.svg" = { + source = ../../../assets/icons/apps/systemd.svg; + }; - home.packages = [ config.system.systemctl-tui.package ]; - }; + home.packages = [ config.system.systemctl-tui.package ]; + }) + (lib.mkIf (config.system.systemctl-tui.enable && config.terminal.kitty.enable) { + xdg.desktopEntries."systemctl-tui" = { + name = "systemctl-tui"; + exec = "${lib.getExe config.terminal.kitty.package} --class systemctl-tui -e ${lib.getExe config.system.systemctl-tui.package}"; + icon = "systemd"; + categories = [ "System" ]; + comment = "TUI for systemctl"; + terminal = false; + type = "Application"; + }; + }) + ]; } -- cgit v1.2.3