diff options
Diffstat (limited to 'modules/system/btop/default.nix')
| -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"; + }; + }) + ]; } |
