modules - fix nvidia drivers module
This commit is contained in:
		
							parent
							
								
									0ac9d2cae2
								
							
						
					
					
						commit
						da0976b92b
					
				| 
						 | 
					@ -11,51 +11,51 @@ in
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  config = mkIf cfg.enable {
 | 
					  config = mkIf cfg.enable {
 | 
				
			||||||
    services.xserver.videoDrivers = [ "nvidia" ];
 | 
					    services.xserver.videoDrivers = [ "nvidia" ];
 | 
				
			||||||
  };
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
  hardware.graphics = {
 | 
					    hardware.graphics = {
 | 
				
			||||||
    enable = true;
 | 
					      enable = true;
 | 
				
			||||||
    enable32Bit = true;
 | 
					      enable32Bit = true;
 | 
				
			||||||
    extraPackages = with pkgs; [
 | 
					      extraPackages = with pkgs; [
 | 
				
			||||||
      vaapiVdpau
 | 
					        vaapiVdpau
 | 
				
			||||||
      libvdpau
 | 
					        libvdpau
 | 
				
			||||||
      libvdpau-vaapi-driver
 | 
					        libvdpau-vaapi-driver
 | 
				
			||||||
      vdpauinfo
 | 
					        vdpauinfo
 | 
				
			||||||
      libva
 | 
					        libva
 | 
				
			||||||
      libva-utils
 | 
					        libva-utils
 | 
				
			||||||
    ];
 | 
					      ];
 | 
				
			||||||
  };
 | 
					    };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  hardware.nvidia = {
 | 
					    hardware.nvidia = {
 | 
				
			||||||
    # modesetting is required
 | 
					      # modesetting is required
 | 
				
			||||||
    modesetting.enable = true;
 | 
					      modesetting.enable = true;
 | 
				
			||||||
    
 | 
					      
 | 
				
			||||||
    # nvidia power management. experimental, can cause sleep/suspend to fail
 | 
					      # nvidia power management. experimental, can cause sleep/suspend to fail
 | 
				
			||||||
    powerManagement.enable = false;
 | 
					      powerManagement.enable = false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # fine-grained power management. turns off gpu when not in use.
 | 
					      # fine-grained power management. turns off gpu when not in use.
 | 
				
			||||||
    # experimental and only works on modern nvidia gpus (turing or newer)
 | 
					      # experimental and only works on modern nvidia gpus (turing or newer)
 | 
				
			||||||
    powerManagement.finegrained = false;
 | 
					      powerManagement.finegrained = false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # dynamicBoost.enable = true;
 | 
					      # dynamicBoost.enable = true;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    nvidiaPersistenced = false;
 | 
					      nvidiaPersistenced = false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # use the nvidia open source kernel module (not to be confused with the
 | 
					      # use the nvidia open source kernel module (not to be confused with the
 | 
				
			||||||
    # independent third-party "nouveau" open source driver).
 | 
					      # independent third-party "nouveau" open source driver).
 | 
				
			||||||
    # support is limited to turing and later architectures. full list of
 | 
					      # support is limited to turing and later architectures. full list of
 | 
				
			||||||
    # supported gpus is at:
 | 
					      # supported gpus is at:
 | 
				
			||||||
    # https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus
 | 
					      # https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus
 | 
				
			||||||
    # only available from driver 515.43.04+
 | 
					      # only available from driver 515.43.04+
 | 
				
			||||||
    # currently alpha-quality/buggy, so false is currently the recommended setting.
 | 
					      # currently alpha-quality/buggy, so false is currently the recommended setting.
 | 
				
			||||||
    open = false;
 | 
					      open = false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # enable the nvidia settings menu.
 | 
					      # enable the nvidia settings menu.
 | 
				
			||||||
    # accessible via `nvidia-settings`.
 | 
					      # accessible via `nvidia-settings`.
 | 
				
			||||||
    nvidiaSettings = true;
 | 
					      nvidiaSettings = true;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # optionally, you may need to select the appropriate driver version for your
 | 
					      # optionally, you may need to select the appropriate driver version for your
 | 
				
			||||||
    # specific gpu.
 | 
					      # specific gpu.
 | 
				
			||||||
    package = config.boot.kernelPackages.nvidiaPackages.latest;
 | 
					      package = config.boot.kernelPackages.nvidiaPackages.latest;
 | 
				
			||||||
 | 
					    };
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
		Loading…
	
		Reference in New Issue