torch+CUDA on nix without nixOS

Nix on NixOS is fine, but nix on other distros historically required some schemes like nixGL which just doesn’t work well. Allegedly there are some fixes coming that make nixgl unnecessary:

But I’ve not tried this in years, so I can’t comment on the recent changes.

Other options are discussed elsewhere:

Best of luck. You might also want to post your actual code if you want feedback on it.