direnv: enter the flake's dev shell on hosts with Nix

`.envrc` runs `use flake` when Nix is present, so on the NixOS hosts
(programs.direnv.enable brings direnv and nix-direnv) cd'ing into a
clone gives the pinned Rust toolchain, clippy, rustfmt, cargo-deny and
make; on titan, which has no Nix, it does nothing. nix-direnv's cache,
.direnv/, is ignored. Checked on straylight in a throwaway copy:
cargo 1.95.0, cargo-deny 0.19.6, rustc from the Nix store.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-09-27 23:12:55 -07:00
co-authored by Claude Opus 5.5
parent b8ebfd45ed
commit c151a7516d
3 changed files with 11 additions and 1 deletions
+2
View File
@@ -34,3 +34,5 @@ owner's NixOS hosts run, so a host's config can use the flake with
- `nix build` builds every binary (`result/bin/`); the tests are not run there, only in `make gate`.
- `nix build .#tools-image` builds the tool containers' image (`deploy/tools-image.nix`).
- `nix develop` gives a shell with `cargo`, `rustc`, `clippy`, `rustfmt`, `cargo-deny` and `make`.
- With direnv (NixOS: `programs.direnv.enable`), `.envrc` enters that shell on `cd`; run
`direnv allow` once per clone. It does nothing on a host without Nix.