if has nix; then
    if ! has nix_direnv_version || ! nix_direnv_version 2.1.1; then
        source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/2.1.1/direnvrc" \
            "sha256-b6qJ4r34rbE23yWjMqbmu3ia2z4b2wIlZUksBke/ol0="
    fi
    nix_direnv_watch_file ./shell.nix
    use flake .
fi
export RUST_LOG="kittybox=trace,sqlx=trace,tower_http::trace=debug,microformats=warn,info"
export BACKEND_URI="postgres://localhost?dbname=kittybox&host=/run/postgresql"
export JOB_QUEUE_URI="postgres://localhost?dbname=kittybox&host=/run/postgresql"
export BLOBSTORE_URI=file://./media-store
export AUTH_STORE_URI=file://./auth-store
export COOKIE_KEY="$(dd if=/dev/urandom bs=128 count=1 status=none | base64 -w0)"
# Add DATABASE_URL for `cargo test` invocations
export DATABASE_URL="postgres://localhost?dbname=kittybox&host=/run/postgresql"
# Don't verify TLS certificates (works only on debug builds, don't get any funny thoughts)
export KITTYBOX_DANGER_INSECURE_TLS=1