diff --git a/common/gpu/nvidia/prime.nix b/common/gpu/nvidia/prime.nix index c551389..371e9eb 100644 --- a/common/gpu/nvidia/prime.nix +++ b/common/gpu/nvidia/prime.nix @@ -1,4 +1,4 @@ -{ lib, pkgs, ... }: +{ lib, pkgs, config, ... }: { imports = [ ./. ]; @@ -6,7 +6,7 @@ hardware.nvidia.prime = { offload = { enable = lib.mkOverride 990 true; - enableOffloadCmd = true; # Provides `nvidia-offload` command. + enableOffloadCmd = lib.mkIf config.hardware.nvidia.prime.offload.enable true; # Provides `nvidia-offload` command. }; # Hardware should specify the bus ID for intel/nvidia devices };