CUDA in NixOS on GCP for a Tesla K80

it’s weird because CUDA is another thing compared to OpenGL but for some reason, it works

Yes, it’s just a legacy naming…
What that option does is it exposes the hardware-dependent user-space drivers in /run/opengl-driver/lib, including libcuda.so.

The naming issues will be resolved by WIP nixos/opengl: move to hardware.drivers by jonringer · Pull Request #158079 · NixOS/nixpkgs · GitHub or one of the parallel PRs