[Nix] Fail immediately when upstream nix install fails
Summary:
Propagate failures when running the upstream nix install script.
This is to avoid the case where the failure gets buried by the output
of the rest of the command.
Part of https://linear.app/comm/issue/ENG-2877
Test Plan:
# If nix is not already installed, install it ./scripts/install_nix.sh # Unset nix from PATH, then re-run script PATH=/usr/bin:/bin ./scripts/install_nix.sh # Anwser yes to the prompts, then assert that it fails without # trying to continue with the script (e.g. nix.conf changes)
Reviewers: varun, atul, ashoat, bartek
Reviewed By: ashoat
Subscribers: ashoat, tomek, atul
Differential Revision: https://phab.comm.dev/D6475