Use nvidia 410 drivers on NixOS


#1

I’m trying to use NixOS (18.09 or 19.03pre) for CUDA development, and need an nvidia driver newer than 390. Yet when I install nvidia, even though the nix expression clearly says that x64 platforms get the 410 version, my system (which is 64 bit) stubbornly installs version 390. What am I doing wrong? How do I customize this to get some other version, such as 396 or 410?

    Thanks,

              Henry

#2

Hi, do you mind sharing your configuration.nix? It will help us figure out and reproduce the issue.


#3

Its exactly the config you get when you do nixos-generate-config and add “nvidia” to the xorg.videoDrivers list. I’ll try again, see if the problem still exists with the current unstable installer, and paste the config, later today.

         Thanks!

#5

FWIW the 18.09 branch has NOT been updated to 410, only unstable:

https://github.com/NixOS/nixpkgs/blob/release-18.09/pkgs/os-specific/linux/nvidia-x11/default.nix

vs

https://github.com/NixOS/nixpkgs/blob/master/pkgs/os-specific/linux/nvidia-x11/default.nix


Your original post says you tried both, but perhaps there was simply a bogon somewhere and you were only on 18.09, by chance? Just a thought.


#6

Seems likely – which version do you get if you install using the 19.03pre installer? Alternatively, is doing nix-channel --add https://nixos.org/channels/nixos-unstalbe nixos and doing a nixos-rebuild switch --upgrade enough? How do I check which version of nixpkgs I’m using, as I agree that using the wrong version of nixpkgs seems the most likely cause…


#7

use

nix-channel --list

as sudo, to show all installed channels.


#8

nixos-version also outputs the current system nixos release.

Or cat /etc/os-release


#9

For OpenCL it’s also required to set hardware.opengl.extraPackages accordingly.


#10

IIRC 410 is relatively new on master; I find it likely that it wasn’t in nixos-unstable channel around a week ago.


#11

Thanks! I think that was the problem. One related thing – is there a way to sub in a new sha256/URL and use a different version? I feel like overlays might be the answer I am looking for, but I’m hoping someone has a pointer to an example used on some other package…