I’ve updated Bash on MacOS using nix-darwin (via nixpkgs). Running either bash -l or exec bash -l reverts Bash to the version that was pre-installed on the machine.
Can someone help me understand why this is occurring? My understanding is that the same sequence of scripts (/etc/profile, /etc/profile.d/nix.sh, etc.) that properly loaded the newer version of Bash at login should also be invoked via bash -l.
Well those are not your actual values of PATH but what you think you are setting - so unclear.for example I see no nix in the latter path.
However I suspect that you have in one of your bash startup shells a call to path_helper which is Apples optimiszation to add things to the path - unfortunately it sets everything to the end.
Sorry for the abuse of notation. What I meant by the shorthand ..:${PATH} is that the after value is just the before value prepended with extra components. Both values were obtained via echo ${PATH}.