Skip to content

chore: add .envrc for anvil-dev fabric integration#431

Open
gerchowl wants to merge 1 commit into
devfrom
chore/anvil-envrc
Open

chore: add .envrc for anvil-dev fabric integration#431
gerchowl wants to merge 1 commit into
devfrom
chore/anvil-envrc

Conversation

@gerchowl
Copy link
Copy Markdown
Contributor

Why

Lars runs Claude Code agents on anvil-dev (NixOS microVM, see gerchowl/anvil ADR-020). The fabric exports a set of env vars via PAM (STRATA_DATA_DIR, SCCACHE_DIR, HF_HOME, …) that every shell on vm-dev inherits — including agent subshells.

This PR adds a .envrc so direnv auto-loads project-specific bindings when you cd into the repo on vm-dev.

What changes

Route MAT_VIS_CACHE into anvil-dev substrate (/srv/anvil/caches/mat-vis) so model/dataset downloads dont fill vm-devs rootfs. Guarded — no-op on non-anvil hosts.

Activation

Run direnv allow once per checkout to enable. On non-anvil hosts (Mac, CI), guarded exports stay unset and code falls back to its existing defaults — zero behaviour change for non-anvil users.

When running on Lars anvil-dev VM, point MAT_VIS_CACHE at
/srv/anvil/caches/mat-vis (substrate-backed, shared with vm-runner
CI) so model/dataset downloads dont fill vm-devs local rootfs.
HF_HOME is already exported globally via PAM session vars.

On non-anvil hosts the guard skips and MAT_VIS_CACHE stays at its
default (~/.cache/mat-vis).

direnv hook auto-loads on cd; other machines should run direnv
allow once to opt in.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant