split into tower and laptop config
This commit is contained in:
31
modules/system/nvidia.nix
Normal file
31
modules/system/nvidia.nix
Normal file
@@ -0,0 +1,31 @@
|
||||
{config, pkgs, ...}:
|
||||
{
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
services.xserver.videoDrivers = ["nvidia"];
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
enable32Bit = true;
|
||||
};
|
||||
|
||||
hardware.nvidia = {
|
||||
modesetting.enable = true;
|
||||
|
||||
# Nvidia power management. Experimental, and can cause sleep/suspend to fail.
|
||||
# Enable this if you have graphical corruption issues or application crashes after waking
|
||||
# up from sleep. This fixes it by saving the entire VRAM memory to /tmp/ instead
|
||||
# of just the bare essentials.
|
||||
powerManagement.enable = true;
|
||||
|
||||
# Fine-grained power management. Turns off GPU when not in use.
|
||||
# Experimental and only works on modern Nvidia GPUs (Turing or newer).
|
||||
# (requires offloading)
|
||||
powerManagement.finegrained = false;
|
||||
|
||||
open = false;
|
||||
nvidiaSettings = true;
|
||||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
};
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user