After opening a new shell, .nix-profile is not in user’s home and no nix-* commands found. E.g., ‘nix-shell’ gives ‘command not found’
Contents of /etc/profile.d/nix.sh:
# Nix
if [ -e ‘/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh’ ]; then
. ‘/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh’
fi
# End Nix
I am having precisely the issue reported by the OP, but on Debian(buster).
After running the install script, and after logging out and back in, ~/.nix-profile does not exist.
The indicated script /etc/profile.d/nix.sh seems to set environment variables, but not actually make the indicated symlink
~/.nix-profile → /nix/var/nix/profiles/…
I’m a complete nix newbie, and so it is not at all clear to me what ought to happen, precisely.
hi – thanks for that! Indeed the symlink was created upon running
nix-env -q
as you suggested. Not precisely sure why I hadn’t tried that – probably mostly “bad luck”. I seem to have jumped the gun when I didn’t see the symlink – I had tried manually creating the symlink ~/.nix-profiles, but didn’t do get it quite right (it appears that I had linked to /nix/var/nix/profiles/per-user/george and somehow left off the final .../profile) and was getting some odd-looking errors.