Compile Nix with a custom store location, and then (optionally) use Nix to create/manage your custom folders with symbolic links.
I’m doing something quite similar at my workplace (or at least I am trying as I can’t use sandbox builds as user namespaces are not enabled).