diff --git a/modules/environment/login/login-inner.nix b/modules/environment/login/login-inner.nix index cb929ddb..53d9f322 100644 --- a/modules/environment/login/login-inner.nix +++ b/modules/environment/login/login-inner.nix @@ -144,6 +144,11 @@ writeText "login-inner" '' usershell="${config.user.shell}" if [ "$#" -gt 0 ]; then # if script is not called from within Nix-on-Droid app exec /usr/bin/env "$@" + elif [ -d "$usershell" ]; then + echo "Cannot execute shell '${config.user.shell}', it is a directory." + echo "Unlike nixos you should point `user.shell` to the exact binary." + echo "Falling back to bash" + exec -l bash elif [ -x "$usershell" ]; then exec -a "-''${usershell##*/}" "$usershell" else