Finally a half-decent CUDA solution on NixOS

Open link in next tab

CUDA on NixOS Without Sacrificing One's Sanity - lavafroth

https://lavafroth.is-a.dev/post/cuda-on-nixos-without-sacrificing-ones-sanity/

What is CUDA? CUDA, also known as Compute Unified Device Architecture is a proprietary parallel computing platform and application programming interface that allows software to use certain types of graphics processing units for accelerated general-purpose processing, an approach called general-purpose computing on GPUs. according to Wikipedia. According to me, it is a proprietary vendor lock-in for machine learning folks and the bane of my existence. There’s no other API out there that competes with CUDA as of writing.

I had been struggling for a while to get CUDA on my main NixOS box for some ML programming. It seems there weren't any clear solutions in the NixOS forums, which just suggested suffering through painful build times. Here's my hacky, less Nix-y approach that takes ~5 minutes.