-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnvidia.nix
58 lines (50 loc) · 1.16 KB
/
nvidia.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
{ config, ... }:
{
boot.initrd.kernelModules = [
"nvidia"
"nvidia_uvm"
"i915"
];
boot.extraModulePackages = [ config.boot.kernelPackages.nvidia_x11 ];
boot.kernelParams = [
"module_blacklist=i915"
"video=2560x1600"
# "acpi_backlight=vendor"
"i915.enable_dpcd_backlight=3"
"nvidia.NVreg_EnableBacklightHandler=1"
"nvidia.NVreg_RegistryDwords=EnableBrightnessControl=1"
];
boot.loader.systemd-boot.consoleMode = "max";
# Load Nvidia driver for Xorg and Wayland
services.xserver.videoDrivers = [ "nvidia" ];
services.xserver.resolutions = [
{
x = 2560;
y = 1600;
}
];
services.xserver.extraDisplaySettings = ''
Depth 24
Modes "2560x1600"
'';
services.xserver.xrandrHeads = [
"Screen 0"
{
monitorConfig = ''
Option "Mode" "2560x1600"
'';
output = "None-1";
}
];
hardware.nvidia = {
modesetting.enable = true;
powerManagement.enable = true;
open = true;
nvidiaSettings = true;
package = config.boot.kernelPackages.nvidiaPackages.latest;
prime = {
intelBusId = "PCI:0:2:0";
nvidiaBusId = "PCI:1:0:0";
};
};
}