# Activate the devenv environment on entering the repo.
#
# watch_file comes first so a reload is triggered even when the eval below
# fails on a broken devenv.nix — otherwise direnv caches the failure and does
# not re-run once the file is fixed.
watch_file devenv.nix devenv.lock devenv.yaml

# `devenv print-dev-env` rather than devenv's `source_url` + `use devenv`: that
# form pins a devenv git revision and sha256 in every repo and needs manual
# bumping. This fetches nothing, and is the same mechanism CLAUDE.md documents
# for loading the environment without a subshell. direnv caches the exported
# environment until one of the watched files changes.
eval "$(devenv print-dev-env)"
