Skip to content

Commit fcbaaa9

Browse files
williamdemeoclaude
andcommitted
flake: document the github:-free update procedure
A plain `nix flake update` re-reads transitive inputs from their upstream flakes, whose declarations still use the `github:` shorthand, so the lock's locked entries for them would regress to the github fetcher and 403 behind the Claude web sandbox proxy. Record the tested `--override-input` invocation that keeps every node on the git fetcher, the check that catches inputs upstream flakes gain later (exercised for real: agda.nix has grown a categorical-crypto input since our pin), and the note that regressed *original* fields after an update are harmless because consumers fetch by the *locked* entries. Verified 2026-08-10 in a scratch copy: the documented command produces a lock with zero github-locked nodes. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 5962af3 commit fcbaaa9

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

flake.nix

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,28 @@
88
# git-over-https works there for any public repo. narHashes are identical
99
# between the two fetchers, so the pins are unchanged. nixpkgs adds
1010
# `shallow=1` so a binary-cache miss fetches only the locked rev.
11+
#
12+
# UPDATING: a plain `nix flake update` re-reads TRANSITIVE inputs from their
13+
# upstream flakes (still declared github:) and would regress the lock. Use:
14+
#
15+
# nix flake update \
16+
# --override-input agda-nix/abstract-set-theory git+https://github.com/input-output-hk/agda-sets \
17+
# --override-input agda-nix/categorical-crypto git+https://github.com/input-output-hk/categorical-crypto \
18+
# --override-input agda-nix/flake-utils git+https://github.com/numtide/flake-utils \
19+
# --override-input agda-nix/flake-utils/systems git+https://github.com/nix-systems/default \
20+
# --override-input agda-nix/iog-prelude git+https://github.com/input-output-hk/iog-agda-prelude \
21+
# --override-input agda-nix/standard-library-classes git+https://github.com/agda/agda-stdlib-classes \
22+
# --override-input agda-nix/standard-library-meta git+https://github.com/agda/agda-stdlib-meta \
23+
# --override-input flake-parts/nixpkgs-lib git+https://github.com/nix-community/nixpkgs.lib
24+
#
25+
# then verify nothing github-locked slipped in (upstreams gain inputs over
26+
# time; `nix flake metadata` shows a new input's path — append an override):
27+
#
28+
# python3 -c "import json; L=json.load(open('flake.lock'))['nodes']; \
29+
# print(*[k for k,v in L.items() if v.get('locked',{}).get('type')=='github'] or ['OK'])"
30+
#
31+
# (Transitive *original* fields read github after an update; harmless —
32+
# fetches go by the *locked* entries.)
1133
inputs = {
1234
nixpkgs.url = "git+https://github.com/NixOs/nixpkgs?shallow=1";
1335

0 commit comments

Comments
 (0)