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/btop | |
| 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/btop')
| -rw-r--r-- | modules/system/btop/default.nix | 43 |
1 files changed, 23 insertions, 20 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"; + }; + }) + ]; } |
