Soneone suggested in the nixpkgs repo to Add option in nix-ld module to load all libraries installed in the system, I read through it, but would like to know exactly why it would be an issue other than “NixOS is not intended to be used in this manner … fighting NixOS to work in an FHS-compliant manner”:
https://github.com/NixOS/nixpkgs/issues/354513#issuecomment-2465688721
I’ll be completely honest with you, this is a very bad decision. nix-ld was designed to help simplify the execution of apps that would require some form of wrapping/rebuilding to work in Nix/NixOS. It’s a great tool to use when you want to avoid headaches, but you’ve genuinely used it too far. NixOS is not intended to be used in this manner, because youre really just fighting NixOS to work in an FHS-compliant manner when it does everything against that principle. At this point you would generally be better off using a standard FHS distro and avoiding Nix/NixOS entirely.
I dont mean this in a disrespectful way at all, just want to point out that this is really making more work for you than its worth, and would cement a very bad practice for NixOS users by encouraging this usage. You’re practically ditching all the benefits of NixOS and Nix by proxy, to try and make FHS-compliant things work this way. It’s really no different than just using any other distro with its package manager.
I should also add I’m very against this type of addition, it encourages people to just set and forget nix-ld, which is not a practice NixOS users should get comfortable with.