···9292 information, see the NVIDIA docs, on Chapter 23. Dynamic Boost on Linux
9393 '';
94949595- modesetting.enable = lib.mkEnableOption ''
9696- kernel modesetting when using the NVIDIA proprietary driver.
9595+ modesetting.enable =
9696+ lib.mkEnableOption ''
9797+ kernel modesetting when using the NVIDIA proprietary driver.
97989898- Enabling this fixes screen tearing when using Optimus via PRIME (see
9999- {option}`hardware.nvidia.prime.sync.enable`. This is not enabled
100100- by default because it is not officially supported by NVIDIA and would not
101101- work with SLI.
9999+ Enabling this fixes screen tearing when using Optimus via PRIME (see
100100+ {option}`hardware.nvidia.prime.sync.enable`. This is not enabled
101101+ by default because it is not officially supported by NVIDIA and would not
102102+ work with SLI.
102103103103- Enabling this and using version 545 or newer of the proprietary NVIDIA
104104- driver causes it to provide its own framebuffer device, which can cause
105105- Wayland compositors to work when they otherwise wouldn't.
106106- '' // {
107107- default = lib.versionAtLeast cfg.package.version "535";
108108- defaultText = lib.literalExpression "lib.versionAtLeast cfg.package.version \"535\"";
109109- };
104104+ Enabling this and using version 545 or newer of the proprietary NVIDIA
105105+ driver causes it to provide its own framebuffer device, which can cause
106106+ Wayland compositors to work when they otherwise wouldn't.
107107+ ''
108108+ // {
109109+ default = lib.versionAtLeast cfg.package.version "535";
110110+ defaultText = lib.literalExpression "lib.versionAtLeast cfg.package.version \"535\"";
111111+ };
110112111113 prime.nvidiaBusId = lib.mkOption {
112114 type = busIDType;
···266268 '';
267269 };
268270269269- gsp.enable = lib.mkEnableOption ''
270270- the GPU System Processor (GSP) on the video card
271271- '' // {
272272- default = useOpenModules || lib.versionAtLeast nvidia_x11.version "555";
273273- defaultText = lib.literalExpression ''
274274- config.hardware.nvidia.open == true || lib.versionAtLeast config.hardware.nvidia.package.version "555"
275275- '';
276276- };
271271+ gsp.enable =
272272+ lib.mkEnableOption ''
273273+ the GPU System Processor (GSP) on the video card
274274+ ''
275275+ // {
276276+ default = useOpenModules || lib.versionAtLeast nvidia_x11.version "555";
277277+ defaultText = lib.literalExpression ''
278278+ config.hardware.nvidia.open == true || lib.versionAtLeast config.hardware.nvidia.package.version "555"
279279+ '';
280280+ };
277281278282 videoAcceleration =
279283 (lib.mkEnableOption ''
···323327 softdep nvidia post: nvidia-uvm
324328 '';
325329 };
326326- systemd.tmpfiles.rules = lib.mkIf config.virtualisation.docker.enableNvidia [ "L+ /run/nvidia-docker/bin - - - - ${nvidia_x11.bin}/origBin" ];
330330+ systemd.tmpfiles.rules = lib.mkIf config.virtualisation.docker.enableNvidia [
331331+ "L+ /run/nvidia-docker/bin - - - - ${nvidia_x11.bin}/origBin"
332332+ ];
327333 services.udev.extraRules = ''
328334 # Create /dev/nvidia-uvm when the nvidia-uvm module is loaded.
329335 KERNEL=="nvidia", RUN+="${pkgs.runtimeShell} -c 'mknod -m 666 /dev/nvidiactl c 195 255'"
···622628 # If requested enable modesetting via kernel parameters.
623629 kernelParams =
624630 lib.optional (offloadCfg.enable || cfg.modesetting.enable) "nvidia-drm.modeset=1"
625625- ++ lib.optional ((offloadCfg.enable || cfg.modesetting.enable) && lib.versionAtLeast nvidia_x11.version "545") "nvidia-drm.fbdev=1"
631631+ ++ lib.optional (
632632+ (offloadCfg.enable || cfg.modesetting.enable) && lib.versionAtLeast nvidia_x11.version "545"
633633+ ) "nvidia-drm.fbdev=1"
626634 ++ lib.optional cfg.powerManagement.enable "nvidia.NVreg_PreserveVideoMemoryAllocations=1"
627635 ++ lib.optional useOpenModules "nvidia.NVreg_OpenRmEnableUnsupportedGpus=1"
628636 ++ lib.optional (config.boot.kernelPackages.kernel.kernelAtLeast "6.2" && !ibtSupport) "ibt=off";
···683691 TOPOLOGY_FILE_PATH = "${nvidia_x11.fabricmanager}/share/nvidia-fabricmanager/nvidia/nvswitch";
684692 DATABASE_PATH = "${nvidia_x11.fabricmanager}/share/nvidia-fabricmanager/nvidia/nvswitch";
685693 };
686686- nv-fab-conf = settingsFormat.generate "fabricmanager.conf" (fabricManagerConfDefaults // cfg.datacenter.settings);
694694+ nv-fab-conf = settingsFormat.generate "fabricmanager.conf" (
695695+ fabricManagerConfDefaults // cfg.datacenter.settings
696696+ );
687697 in
688698 "${lib.getExe nvidia_x11.fabricmanager} -c ${nv-fab-conf}";
689699 LimitCORE = "infinity";