diff options
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/system/btop/default.nix | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/modules/system/btop/default.nix b/modules/system/btop/default.nix index 1834aa2..5375a5b 100644 --- a/modules/system/btop/default.nix +++ b/modules/system/btop/default.nix @@ -1,16 +1,22 @@ # Cross-platform graphical process and system monitor { config, + pkgs, lib, ... }: { options.system.btop = { enable = lib.mkEnableOption "Enables btop."; + nvidia.enable = lib.mkEnableOption "Build btop with NVIDIA GPU monitoring support (CUDA)."; + amd.enable = lib.mkEnableOption "Build btop with AMD GPU monitoring support (ROCm)."; package = lib.mkOption { type = lib.types.package; readOnly = true; - default = config.programs.btop.package; + default = pkgs.btop.override { + cudaSupport = config.system.btop.nvidia.enable; + rocmSupport = config.system.btop.amd.enable; + }; description = "The btop package to use."; }; }; @@ -18,6 +24,7 @@ config = lib.mkIf config.system.btop.enable { programs.btop = { enable = true; + package = config.system.btop.package; }; }; } |
