nixos/nvidia: make the nvidia driver variant a mandatory user choice

fixes #329450
This commit is contained in:
Kiskae
2024-08-25 21:47:29 +02:00
parent 8b52dae3ec
commit 20c5d0adfb
2 changed files with 10 additions and 5 deletions
@@ -137,6 +137,8 @@
Processes also now run as a dynamically allocated user by default instead of
root.
- The nvidia driver no longer defaults to the proprietary driver starting with version 560. You will need to manually set `hardware.nvidia.open` to select the proprietary or open driver.
- `singularity-tools` have the `storeDir` argument removed from its override interface and use `builtins.storeDir` instead.
- Two build helpers in `singularity-tools`, i.e., `mkLayer` and `shellScript`, are deprecated, as they are no longer involved in image-building. Maintainers will remove them in future releases.
+8 -5
View File
@@ -254,10 +254,13 @@ in
'';
};
open = lib.mkEnableOption ''
the open source NVIDIA kernel module
'' // {
defaultText = lib.literalExpression ''lib.versionAtLeast config.hardware.nvidia.package.version "560"'';
open = lib.mkOption {
example = true;
description = "Whether to enable the open source NVIDIA kernel module.";
type = lib.types.bool;
defaultText = lib.literalExpression ''
lib.mkIf (lib.versionOlder config.hardware.nvidia.package.version "560") false
'';
};
};
};
@@ -308,7 +311,7 @@ in
};
environment.systemPackages = [ nvidia_x11.bin ];
hardware.nvidia.open = lib.mkDefault (lib.versionAtLeast nvidia_x11.version "560");
hardware.nvidia.open = lib.mkIf (lib.versionOlder nvidia_x11.version "560") (lib.mkDefault false);
})
# X11