summaryrefslogtreecommitdiffstats
path: root/nixos/modules/hardware/video/nvidia.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/modules/hardware/video/nvidia.nix')
-rw-r--r--nixos/modules/hardware/video/nvidia.nix68
1 files changed, 34 insertions, 34 deletions
diff --git a/nixos/modules/hardware/video/nvidia.nix b/nixos/modules/hardware/video/nvidia.nix
index 352c8d8ead54..37d8e53a2e04 100644
--- a/nixos/modules/hardware/video/nvidia.nix
+++ b/nixos/modules/hardware/video/nvidia.nix
@@ -23,9 +23,9 @@
in {
options = {
hardware.nvidia = {
- datacenter.enable = lib.mkEnableOption (lib.mdDoc ''
+ datacenter.enable = lib.mkEnableOption ''
Data Center drivers for NVIDIA cards on a NVLink topology
- '');
+ '';
datacenter.settings = lib.mkOption {
type = settingsFormat.type;
default = {
@@ -74,41 +74,41 @@ in {
DATABASE_PATH="''${nvidia_x11.fabricmanager}/share/nvidia-fabricmanager/nvidia/nvswitch";
}
'';
- description = lib.mdDoc ''
+ description = ''
Additional configuration options for fabricmanager.
'';
};
- powerManagement.enable = lib.mkEnableOption (lib.mdDoc ''
+ powerManagement.enable = lib.mkEnableOption ''
experimental power management through systemd. For more information, see
the NVIDIA docs, on Chapter 21. Configuring Power Management Support
- '');
+ '';
- powerManagement.finegrained = lib.mkEnableOption (lib.mdDoc ''
+ powerManagement.finegrained = lib.mkEnableOption ''
experimental power management of PRIME offload. For more information, see
the NVIDIA docs, on Chapter 22. PCI-Express Runtime D3 (RTD3) Power Management
- '');
+ '';
- dynamicBoost.enable = lib.mkEnableOption (lib.mdDoc ''
+ dynamicBoost.enable = lib.mkEnableOption ''
dynamic Boost balances power between the CPU and the GPU for improved
performance on supported laptops using the nvidia-powerd daemon. For more
information, see the NVIDIA docs, on Chapter 23. Dynamic Boost on Linux
- '');
+ '';
- modesetting.enable = lib.mkEnableOption (lib.mdDoc ''
+ modesetting.enable = lib.mkEnableOption ''
kernel modesetting when using the NVIDIA proprietary driver.
Enabling this fixes screen tearing when using Optimus via PRIME (see
{option}`hardware.nvidia.prime.sync.enable`. This is not enabled
by default because it is not officially supported by NVIDIA and would not
work with SLI
- '');
+ '';
prime.nvidiaBusId = lib.mkOption {
type = busIDType;
default = "";
example = "PCI:1:0:0";
- description = lib.mdDoc ''
+ description = ''
Bus ID of the NVIDIA GPU. You can find it using lspci; for example if lspci
shows the NVIDIA GPU at "01:00.0", set this option to "PCI:1:0:0".
'';
@@ -118,7 +118,7 @@ in {
type = busIDType;
default = "";
example = "PCI:0:2:0";
- description = lib.mdDoc ''
+ description = ''
Bus ID of the Intel GPU. You can find it using lspci; for example if lspci
shows the Intel GPU at "00:02.0", set this option to "PCI:0:2:0".
'';
@@ -128,13 +128,13 @@ in {
type = busIDType;
default = "";
example = "PCI:4:0:0";
- description = lib.mdDoc ''
+ description = ''
Bus ID of the AMD APU. You can find it using lspci; for example if lspci
shows the AMD APU at "04:00.0", set this option to "PCI:4:0:0".
'';
};
- prime.sync.enable = lib.mkEnableOption (lib.mdDoc ''
+ prime.sync.enable = lib.mkEnableOption ''
NVIDIA Optimus support using the NVIDIA proprietary driver via PRIME.
If enabled, the NVIDIA GPU will be always on and used for all rendering,
while enabling output to displays attached only to the integrated Intel/AMD
@@ -156,30 +156,30 @@ in {
Note that this configuration will only be successful when a display manager
for which the {option}`services.xserver.displayManager.setupCommands`
option is supported is used
- '');
+ '';
- prime.allowExternalGpu = lib.mkEnableOption (lib.mdDoc ''
+ prime.allowExternalGpu = lib.mkEnableOption ''
configuring X to allow external NVIDIA GPUs when using Prime [Reverse] sync optimus
- '');
+ '';
- prime.offload.enable = lib.mkEnableOption (lib.mdDoc ''
+ prime.offload.enable = lib.mkEnableOption ''
render offload support using the NVIDIA proprietary driver via PRIME.
If this is enabled, then the bus IDs of the NVIDIA and Intel/AMD GPUs have to
be specified ({option}`hardware.nvidia.prime.nvidiaBusId` and
{option}`hardware.nvidia.prime.intelBusId` or
{option}`hardware.nvidia.prime.amdgpuBusId`)
- '');
+ '';
- prime.offload.enableOffloadCmd = lib.mkEnableOption (lib.mdDoc ''
+ prime.offload.enableOffloadCmd = lib.mkEnableOption ''
adding a `nvidia-offload` convenience script to {option}`environment.systemPackages`
for offloading programs to an nvidia device. To work, should have also enabled
{option}`hardware.nvidia.prime.offload.enable` or {option}`hardware.nvidia.prime.reverseSync.enable`.
Example usage `nvidia-offload sauerbraten_client`
- '');
+ '';
- prime.reverseSync.enable = lib.mkEnableOption (lib.mdDoc ''
+ prime.reverseSync.enable = lib.mkEnableOption ''
NVIDIA Optimus support using the NVIDIA proprietary driver via reverse
PRIME. If enabled, the Intel/AMD GPU will be used for all rendering, while
enabling output to displays attached only to the NVIDIA GPU without a
@@ -205,40 +205,40 @@ in {
Note that this configuration will only be successful when a display manager
for which the {option}`services.xserver.displayManager.setupCommands`
option is supported is used
- '');
+ '';
nvidiaSettings =
- (lib.mkEnableOption (lib.mdDoc ''
+ (lib.mkEnableOption ''
nvidia-settings, NVIDIA's GUI configuration tool
- ''))
+ '')
// {default = true;};
- nvidiaPersistenced = lib.mkEnableOption (lib.mdDoc ''
+ nvidiaPersistenced = lib.mkEnableOption ''
nvidia-persistenced a update for NVIDIA GPU headless mode, i.e.
It ensures all GPUs stay awake even during headless mode
- '');
+ '';
- forceFullCompositionPipeline = lib.mkEnableOption (lib.mdDoc ''
+ forceFullCompositionPipeline = lib.mkEnableOption ''
forcefully the full composition pipeline.
This sometimes fixes screen tearing issues.
This has been reported to reduce the performance of some OpenGL applications and may produce issues in WebGL.
It also drastically increases the time the driver needs to clock down after load
- '');
+ '';
package = lib.mkOption {
default = config.boot.kernelPackages.nvidiaPackages."${if cfg.datacenter.enable then "dc" else "stable"}";
defaultText = lib.literalExpression ''
config.boot.kernelPackages.nvidiaPackages."\$\{if cfg.datacenter.enable then "dc" else "stable"}"
'';
- example = lib.mdDoc "config.boot.kernelPackages.nvidiaPackages.legacy_470";
- description = lib.mdDoc ''
+ example = "config.boot.kernelPackages.nvidiaPackages.legacy_470";
+ description = ''
The NVIDIA driver package to use.
'';
};
- open = lib.mkEnableOption (lib.mdDoc ''
+ open = lib.mkEnableOption ''
the open source NVIDIA kernel module
- '');
+ '';
};
};