Commit 6a214f3e06 reused the NixOS environment initialisation for nix-profile.sh, but this is inappropriate on systems that don't have multi-user support enabled.
6a214f3e06