Nvidia, add option to use stable drivers
This commit is contained in:
parent
29c2b1ce80
commit
544bb630a0
2 changed files with 10 additions and 7 deletions
|
|
@ -2,22 +2,22 @@
|
|||
|
||||
{
|
||||
options.nvidia = {
|
||||
enable = lib.mkEnableOption
|
||||
"Enables nvidia with proprietary drivers";
|
||||
enable = lib.mkEnableOption "Enables nvidia with proprietary drivers";
|
||||
open = lib.mkEnableOption "Use open nvidia option for newer cards";
|
||||
stable = lib.mkEnableOption "Use stable instead of beta";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.nvidia.enable {
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
};
|
||||
hardware.graphics.enable = true;
|
||||
|
||||
services.xserver.videoDrivers = ["nvidia"];
|
||||
|
||||
hardware.nvidia = {
|
||||
open = if config.nvidia.open then true else false;
|
||||
modesetting.enable = true;
|
||||
package = config.boot.kernelPackages.nvidiaPackages.beta;
|
||||
package = if config.nvidia.stable
|
||||
then config.boot.kernelPackages.nvidiaPackages.stable
|
||||
else config.boot.kernelPackages.nvidiaPackages.beta;
|
||||
};
|
||||
|
||||
boot.kernelParams = [ "nvidia_drm.fbdev=1" ];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue