Multiple versions of nvidia driver

Hi everyone!

My machine has 2 GPUs: a 1080Ti and a GT 730 (because I’d like to VFIO). The GT 730 should only be used for NixOS, while the 1080Ti should be passed to a VM every now and then.

In the meantime, though, only the 1080Ti works - the GT 730 does not, because I use the latest “nvidia” drivers:

services.xserver.videoDrivers = [ "nvidia" ];

If I add “nvidiaLegacy390” to the above list, as specified here - nix doesn’t like it, and says that

error: Selecting an nvidia driver has been modified for NixOS 19.03. The version is now set using `hardware.nvidia.package`.

However, that option does not accept a list - thus I would be stuck with only one driver at a time. So, how does one run 2 different nvidia driver versions alongside?

1 Like