nvidia: move configurations in respective files

This commit is contained in:
Christoph Hollizeck 2024-11-06 09:45:25 +01:00
parent 0a5c8565f0
commit 027f6bee44
3 changed files with 30 additions and 15 deletions

View file

@ -32,5 +32,22 @@ in
};
services.xserver.videoDrivers = [ "nvidia" ];
boot.kernelParams = [
"nvidia_drm.fbdev=1"
# TODO: remove after https://github.com/NVIDIA/open-gpu-kernel-modules/pull/692
# and similar are merged and build in nixpkgs-unstable.
# WARNING: this disables tty output and thus hides boot logs.
"initcall_blacklist=simpledrm_platform_driver_init"
];
environment.sessionVariables = {
GBM_BACKEND = "nvidia-drm";
__GLX_VENDOR_LIBRARY_NAME = "nvidia";
LIBVA_DRIVER_NAME = "nvidia";
__GL_GSYNC_ALLOWED = "1";
__GL_VRR_ALLOWED = "0";
NVD_BACKEND = "direct";
};
};
}