Automatically use a chroot store if /nix doesn't exist
Automatically use a chroot store if /nix doesn't exist

Specifically, if we're not root and the daemon socket does not exist,
then we use ~/.local/share/nix/root as a chroot store. This enables
non-root users to download nix-static and have it work out of the box,
e.g.

  ubuntu@ip-10-13-1-146:~$ ~/nix run nixpkgs#hello
  warning: '/nix' does not exists, so Nix will use '/home/ubuntu/.local/share/nix/root' as a chroot store
  Hello, world!

NixOS/nix,NixOS/nix,NixOS/nix,NixOS/nix,NixOS/nix