fix: enable enableOffloadCmd in prime.nix only when offload is enabled

This commit is contained in:
Guanran928 2023-09-17 13:52:47 -06:00 committed by mergify[bot]
parent 504893e091
commit d53069def4

View file

@ -1,4 +1,4 @@
{ lib, pkgs, ... }: { lib, pkgs, config, ... }:
{ {
imports = [ ./. ]; imports = [ ./. ];
@ -6,7 +6,7 @@
hardware.nvidia.prime = { hardware.nvidia.prime = {
offload = { offload = {
enable = lib.mkOverride 990 true; 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 # Hardware should specify the bus ID for intel/nvidia devices
}; };