Nvidia, add option to use open drivers
This commit is contained in:
parent
3b7b2eb45f
commit
863891641f
1 changed files with 2 additions and 4 deletions
|
|
@ -4,20 +4,18 @@
|
||||||
options.nvidia = {
|
options.nvidia = {
|
||||||
enable = lib.mkEnableOption
|
enable = lib.mkEnableOption
|
||||||
"Enables nvidia with proprietary drivers";
|
"Enables nvidia with proprietary drivers";
|
||||||
|
open = lib.mkEnableOption "Use open nvidia option for newer cards";
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf config.nvidia.enable {
|
config = lib.mkIf config.nvidia.enable {
|
||||||
hardware.graphics = {
|
hardware.graphics = {
|
||||||
enable = true;
|
enable = true;
|
||||||
extraPackages = with pkgs; [
|
|
||||||
rocm-opencl-icd
|
|
||||||
rocm-opencl-runtime
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
services.xserver.videoDrivers = ["nvidia"];
|
services.xserver.videoDrivers = ["nvidia"];
|
||||||
|
|
||||||
hardware.nvidia = {
|
hardware.nvidia = {
|
||||||
|
open = if config.nvidia.open then true else false;
|
||||||
modesetting.enable = true;
|
modesetting.enable = true;
|
||||||
package = config.boot.kernelPackages.nvidiaPackages.beta;
|
package = config.boot.kernelPackages.nvidiaPackages.beta;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue