init
This commit is contained in:
28
modules/nixos/nvidia.nix
Normal file
28
modules/nixos/nvidia.nix
Normal file
@@ -0,0 +1,28 @@
|
||||
{ config, ... }:
|
||||
{
|
||||
# Tell Xorg to use the nvidia driver (also valid for Wayland)
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
|
||||
hardware = {
|
||||
# Make sure opengl is enabled
|
||||
graphics.enable = true;
|
||||
nvidia = {
|
||||
|
||||
# Modesetting is needed for most Wayland compositors
|
||||
modesetting.enable = true;
|
||||
|
||||
# Use the open source version of the kernel module
|
||||
# Only available on driver 515.43.04+
|
||||
open = false;
|
||||
|
||||
# Enable the nvidia settings menu
|
||||
nvidiaSettings = true;
|
||||
|
||||
powerManagement.enable = true;
|
||||
|
||||
# Optionally, you may need to select the appropriate driver version for your specific GPU.
|
||||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user