if type -P lorri &>/dev/null; then
  if test -n "$TMPDIR"; then
    export TMPDIR="$(readlink -f $TMPDIR)"
  fi
  eval "$(lorri direnv --flake .)"
else
  echo 'while direnv evaluated .envrc, could not find the command "lorri" [https://github.com/nix-community/lorri]'
  use nix
fi