[Nix] Write Nix path to user shell files upon install
Summary:
Avoid situtations where Apple updates "delete" nix from
PATH by adding nix to the PATH of user zsh and bash shells.
~/.zshenv, ~/.profile, ~/.bashrc, and ~/.bash_profile were chosen
to reflect the files that rustup also writes to.
Part of https://linear.app/comm/issue/ENG-2566
Test Plan:
./scripts/install_nix.sh # Should see it emit that it writes to ~/.zshenv # and potentionally others # Assert that it was written cat ~/.zshenv # Open new shell echo $PATH # Nix should have multiple paths if /etc/zshrc still sources Nix logic
Reviewers: varun, ashoat, atul
Reviewed By: ashoat
Subscribers: tomek, atul
Differential Revision: https://phab.comm.dev/D6149