Have you considered adding the libraries just to your shells packages list, rather than tampering with LD_LIBRARY_PATH which you should barely ever touch yourself, especially at this scope.
The thing is that I am an admin of a small HPC cluster, so I would prefer a setup that avoids the user having to create any .nix file or anything. I would like it to be completely invisible to the user…
But yeah, for my personal computer, I have different shell .nix files when I work with opencv or whatever and I use that… I was trying to have a solution where the users would use the power of nix if they wanted, but if they didn’t want, they didn’t need to bother with it either…
I appreciate the concern, but it’s an HPC that is used by both power users and novice users. What we could do it make a default shell for novice users and let power users build their own shell scripts… That’s not a bad thought!
In any case, if you use pip/uv/poetry (some packages are unfortunately only available in pypi so we need to use one of them), it would be really helpful, if you would like to share what you do.
I’m assuming you’re aware of uv2nix? It doesn’t solve your issue of making libraries transparently available to non-Nix users but might help create per-project environments.