nixos/nvidia: make the nvidia driver variant a mandatory user choice
fixes #329450
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user