split into tower and laptop config

This commit is contained in:
2025-11-03 11:36:56 +01:00
parent 1e738d598b
commit 1aa72c7a30
28 changed files with 308 additions and 84 deletions

31
modules/system/nvidia.nix Normal file
View 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;
};
}