nixos/nvidia: Add NVIDIA optimus option to allow external GPUs
Without this option - NVIDIA refuses to use an external GPU.
This commit is contained in:
parent
cdf234714b
commit
d67494972d
@ -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 New Issue
Block a user