diff options
| author | Arpit Chakladar <arpitchakladar@gmail.com> | 2026-09-20 04:00:07 +0530 |
|---|---|---|
| committer | Arpit Chakladar <arpitchakladar@gmail.com> | 2026-09-20 04:00:07 +0530 |
| commit | fb442560064f98ee850c71d78330b9b3abda4774 (patch) | |
| tree | 31fad467ca31b2f9127f4ea254eab76f4ce18a5f /modules/system | |
| parent | c3c245c7633885f6860191eede646d048def3e0d (diff) | |
| download | home-manager-config-fb442560064f98ee850c71d78330b9b3abda4774.tar.gz home-manager-config-fb442560064f98ee850c71d78330b9b3abda4774.zip | |
chore: added option guards to desktop entries for tuis
Diffstat (limited to 'modules/system')
| -rw-r--r-- | modules/system/btop/default.nix | 43 | ||||
| -rw-r--r-- | modules/system/systemctl-tui/default.nix | 35 |
2 files changed, 42 insertions, 36 deletions
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"; + }; + }) + ]; } |
