I think installing Calibre is a good use case for installing Nix (https://www.nixos.org).
Unfortunately, you might also need https://github.com/guibou/nixGL to run graphical apps under Nix. It's a shell script to use the correct OpenGL library.
I get what you mean, but keep in mind that for every distro you're reliant on the community to get nvidia support integrated. Also if you only have few apps that require it, then the nixGL flake is not bad. https://github.com/guibou/nixGL
Yes! Although not for CUDA. I used opencl. nixgl helped here: https://github.com/guibou/nixGL. CUDA should be even simpler since you just add the CUDA .so paths to the RPATH. Allthough I might be missing something. Custom libc might be a whole can of worms though if it happens to be incompatible.
Nix has OpenGL it just doesn't know how to find the driver on non NixOS distros by default, can fix it with this: https://github.com/guibou/nixGL
Yeah, I’m not sure how up-to-date my knowledge is, but opengl and the like are exceptions to the usual deterministic handling of dependencies on non-NixOS distros (not because it is unable to do so, I think it is mainly to avoid storing everything n-times with nvidia/amd), and one has to specify them. It was quite a time I ran nix on a non-nixos distro but there is this tool https://github.com/guibou/nixGL that meant to solve the issue of graphical programs.
Here are some links that might help you to get OpenGL work with nix programs on non-NixOS machines:
* https://github.com/NixOS/nixpkgs/issues/9415#issuecomment-30...