-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnvidia.nix
65 lines (54 loc) · 2.03 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
59
60
61
62
63
64
65
{ pkgs, config, lib, inputs, ... }:
with lib;
{
nixpkgs.overlays = [
(_: final: {
wlroots = final.wlroots.overrideAttrs (_: {
patches = [
./patches/wlroots-nvidia.patch
./patches/wlroots-screenshare.patch
];
});
})
];
# Works for Wayland as well
services.xserver.videoDrivers = [ "nvidia" ];
environment.variables = {
__GLX_VENDOR_LIBRARY_NAME = "nvidia";
GBM_BACKEND = "nvidia-drm";
XDG_SESSION_TYPE = "wayland";
LIBVA_DRIVER_NAME = "nvidia";
NVD_BACKEND = "direct";
#NIXOS_OZONE_WL = "1";
};
hardware.nvidia = {
# Is needed for Wayland compositors
modesetting.enable = true;
powerManagement.enable = false;
powerManagement.finegrained = false;
# Use open source driver
open = false;
# Enable nvidia settings menu
nvidiaSettings = true;
# Driver package. Using an outdated driver which doesn't cause problems with games.
/*package = config.boot.kernelPackages.nvidiaPackages.mkDriver {
version = "535.113.01";
sha256_64bit = "sha256-KOME2N/oG39en2BAS/OMYvyjVXjZdSLjxwoOjyMWdIE=";
sha256_aarch64 = "sha256-k7k22z5PYZdBVfuYXVcl9SFUMqZmK4qyxoRwlYyRdgU=";
openSha256 = "sha256-dktHCoESqoNfu5M73aY5MQGROlZawZwzBqs3RkOyfoQ=";
settingsSha256 = "sha256-hiX5Nc4JhiYYt0jaRgQzfnmlEQikQjuO0kHnqGdDa04=";
persistencedSha256 = "sha256-ci86XGlno6DbHw6rkVSzBpopaapfJvk0+lHcR4LDq50=";
ibtSupport = true;
};*/
package = config.boot.kernelPackages.nvidiaPackages.beta;
/*package = config.boot.kernelPackages.nvidiaPackages.mkDriver {
version = "555.58";
sha256_64bit = "sha256-bXvcXkg2kQZuCNKRZM5QoTaTjF4l2TtrsKUvyicj5ew=";
sha256_aarch64 = "sha256-7XswQwW1iFP4ji5mbRQ6PVEhD4SGWpjUJe1o8zoXYRE=";
openSha256 = "sha256-hEAmFISMuXm8tbsrB+WiUcEFuSGRNZ37aKWvf0WJ2/c=";
settingsSha256 = "sha256-vWnrXlBCb3K5uVkDFmJDVq51wrCoqgPF03lSjZOuU8M=";
persistencedSha256 = "sha256-lyYxDuGDTMdGxX3CaiWUh1IQuQlkI2hPEs5LI20vEVw=";
ibtSupport = true;
};*/
};
}