3
0
Fork 0
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:
worldofpeace 2019-05-03 10:31:11 -04:00 committed by GitHub
commit a01943c7f0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 =
''