export DIRENV_WARN_TIMEOUT=2m

# Load .env for everyone. Only bring up the Nix flake dev shell when Nix is
# actually installed, so direnv users without Nix are not hit with a
# `nix: command not found` error on every cd into the repo.
dotenv

if has nix; then
    if ! has nix_direnv_version || ! nix_direnv_version 3.0.5; then
        source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/3.0.5/direnvrc" "sha256-RuwIS+QKFj/T9M2TFXScjBsLR6V3A17YVoEW/Q6AZ1w="
    fi
    use flake
fi
