Why not just do `if [ -z "$IN_NIX_SHELL" ];` then?