You shouldn’t be installing those kernel modules yourself at all, the nvidia module will do that.
In addition to the kernel modules mentioned above, installing nvidia-vaapi-driver through environment.systemPackages also does nothing. That should go in hardware.graphics.extraPackages if you want it.
The most basic problem, though, is that you haven’t enabled the use of the nvidia module at all. You need to set services.xserver.videoDrivers = [ "nvidia" ];
On a card that old, wayland may not be an option. Last I knew, it wasn’t on mine (a GeForce GTX 970). (Though maybe kwin works around it? I remember something about that, but it wasn’t relevant to me as I want to use sway.)
To be clear, don’t use _beta or anything. Just don’t set the package option, and let NixOS choose the default.
Whenever the 590 driver comes out, you’ll probably want to switch to _legacy580 (since the 590 driver deprecates support for your GPU), but nixpkgs doesn’t have a special package for that yet.
I’d still recommend at least using the open driver. If you don’t trust me, then hear it from nvidia themselves (your GPU is Maxwell): Chapter 45. Open Linux Kernel Modules
Most other stuff you set should at least just be a repeat of the defaults, which isn’t harmful.
Nice, I thought the open driver supported only very new ones? My GPU is Pascal or Maxwell, idk wasnt able to find out easily. So I understood that either of them is older than Turing and not supported by the open source driver sadly.
Nouveau caused many crashes, but I am very much in favor of an open driver even at a performance downgrade.
Thanks for the help! Will try the open one tomorrow
Maxwell or newer. Your GPU is “very new”, by some definition of “very new”.
Nope. In my defense, it’s late.
The open module developed by nvidia shouldn’t cause any performance degradation or anything. It’s the only driver actively being developed now, if anything you’ll see better performance.
Newer cards even only work with the open driver.
Nouveau is a third-party FOSS alternative, it has nothing to do with the open nvidia module.
Ah, oops, nevermind. I was surprised by that too, I clearly read the wrong paragraph. Quoting the manual page I linked:
The open flavor of kernel modules supports Turing and later GPUs. The open kernel modules cannot support GPUs before Turing, because the open kernel modules depend on the GPU System Processor (GSP) first introduced in Turing.