[Nix] Fix undeclared failure
Summary:
'set -u' will error if a variable is unset. Add bash
substitution to prevent the undefined variable causing an error.
https://linear.app/comm/issue/ENG-2838
Test Plan:
PS1= ./scripts/prompt_macos_direnv.sh
Reviewers: varun, atul
Reviewed By: varun, atul
Subscribers: ashoat, tomek
Differential Revision: https://phab.comm.dev/D6404