The default path could be changed too, of course, but putting it under your home directory would mean that you could only share cached packages with other people that share your username. It would also break NixOS, since that uses Nix to manage the entire system.
> It means I can migrate things completely by copying one directory, rather than using an "Installer" in the Windows tradition.
Nix ships with a specific tool for copying packages (including dependency trees) between computers, nix-copy-closure. But this also assumes that the store path is the same.
Do you know whether Nix has a proposal to fix that big ease-of-relocation issue via path rewriting? Afaik Spack package manager builds with padded paths so those can then be rewritten to practically any install path
EDIT: theres also work being done to move to content-addressed nix store, in which case changing these things would invalidate the content hash
Relocating is really only a matter of relocating prefixes.
I am not sure how it would affect a content-addressed nix store, but I'm also not 100% sure why you want a content-addressed nix store. Addressing by the derivation hash (which is also what Spack does) lets you find valid build substitutes... would you index that separately for a content-addressed store?
Is the goal to allow multiple versions of non-reproducible builds in the same store?
Personally I prefer to even store regular Mac apps I download in ~/Applications, and anything I can install without disturbing system-global stuff, I prefer to do that way. It means I can migrate things completely by copying one directory, rather than using an "Installer" in the Windows tradition.