Hey,
I’m trying to run older version of nix but it somehow goes to the bottom of my $PATH.
What could be the reason?
$ nix shell github:nixos/nix/2.11.0
$ nix --version
$ echo $PATH
/nix/var/nix/profiles/default/bin /run/current-system/sw/bin /Users/onnimonni/.nix-profile/bin /nix/store/lr32i0bdarx1iqsch4sy24jj1jkfw9vf-nix-2.11.0/bin /nix/var/nix/profiles/default/bin /Users/onnimonni/.nix-profile/bin /usr/local/bin /System/Cryptexes/App/usr/bin /usr/bin /bin /usr/sbin /sbin /var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin /var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin /var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin /Library/Apple/usr/bin
So it indeed adds the /nix/store/lr32i0bdarx1iqsch4sy24jj1jkfw9vf-nix-2.11.0/bin
to the $PATH but it’s below /nix/var/nix/profiles/default/bin
and /run/current-system/sw/bin
so it will never be used.
I installed my nix initially from NixOS installer:
curl -L https://nixos.org/nix/install | sh -s
And I’m using nix-darwin
with my flake.nix visible here.
How could I setup my environment in a way where the nix shell
would actually prepend the path to correct place in the $PATH?