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 = {
|
||||
enable = lib.mkEnableOption
|
||||
"Enables nvidia with proprietary drivers";
|
||||
open = lib.mkEnableOption "Use open nvidia option for newer cards";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.nvidia.enable {
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
extraPackages = with pkgs; [
|
||||
rocm-opencl-icd
|
||||
rocm-opencl-runtime
|
||||
];
|
||||
};
|
||||
|
||||
services.xserver.videoDrivers = ["nvidia"];
|
||||
|
||||
hardware.nvidia = {
|
||||
open = if config.nvidia.open then true else false;
|
||||
modesetting.enable = true;
|
||||
package = config.boot.kernelPackages.nvidiaPackages.beta;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue