HomePhabricator
Diffusion Comm f2920a062f0e

[Nix] Write Nix path to user shell files upon install

Description

[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

Details

Provenance
jonAuthored on Jan 3 2023, 10:31 AM
Reviewer
ashoat
Differential Revision
D6149: [Nix] Write Nix path to user shell files upon install
Parents
rCOMM14c06c14a918: Revert "[CommCoreModule] Remove `userID` argument from `initializeCryptoAccount…
Branches
Unknown
Tags
Unknown