Sourcing nix_direnv seems to cause some potential
issues on machines with older versions of bash. Instead, use
a script which has some fallback behavior to determine the
desired action.
This also preserves the parent shell (e.g. zsh, fish, or bash)