forked from mirrors/nixpkgs
Merge pull request #59856 from c00w/external_gpu
nixos/nvidia: Add NVIDIA optimus option to allow external GPUs
This commit is contained in:
commit
a01943c7f0
|
@ -79,6 +79,14 @@ in
|
|||
'';
|
||||
};
|
||||
|
||||
hardware.nvidia.optimus_prime.allowExternalGpu = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Configure X to allow external NVIDIA GPUs when using optimus.
|
||||
'';
|
||||
};
|
||||
|
||||
hardware.nvidia.optimus_prime.nvidiaBusId = lib.mkOption {
|
||||
type = lib.types.string;
|
||||
default = "";
|
||||
|
@ -134,6 +142,7 @@ in
|
|||
deviceSection = optionalString optimusCfg.enable
|
||||
''
|
||||
BusID "${optimusCfg.nvidiaBusId}"
|
||||
${optionalString optimusCfg.allowExternalGpu "Option \"AllowExternalGpus\""}
|
||||
'';
|
||||
screenSection =
|
||||
''
|
||||
|
|
Loading…
Reference in a new issue