Every founding pushes the whole nixpkgs SOURCE tree (205 MB, unsigned) from the operator's laptop to the gateway — it is in the runtime closure via /etc/nix/registry.json and clan-cli #1803
Labels
No labels
agent-blocked
agent-working
autopilot
bug
deferred
deploy-pending
enhancement
landing-pr
model-haiku
model-opus
model-sonnet
needs-design
needs-info
needs-triage
no-triage
out-of-scope
priority
ready-for-agent
ready-for-human
ready-for-session
rehearsal-183
snapshot-pending
standing-drive
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Matou/idss#1803
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Proven (cold manual founding #2 of
whakatohea-demo, 2026-09-23 17:00 NZST, buildff4a5263, rented 8 GB DO syd1134.199.167.181)The install-phase copy (
internal/clan/enrollment.go:1345,nix copy --no-check-sigs --substitute-on-destination --to ssh-ng://root@… <toplevel>) is doing what #699/#1764 intend — the gateway substitutes the stock paths itself. Splitting the gateway system closure…-nixos-system-gateway-26.11.20260612.173d0adwithnix path-info -r --jsonbysignatures:The unsigned set, largest first:
nix-store --query --referrers /nix/store/lr5ld8f0qbyhjx3nr9mxfvg4cndvpggp-source:Measured link during the copy (
ss -tin): ~325 KB/s sustained from the laptop → the 354 MB leg is ~18 minutes of a founding, and 58 % of it is nixpkgs source text. Nothing in our own modules sets it —grep -rn 'nix.registry\|nixPath' --include=*.nixover the fleet finds only comments inflake.nix— so it is clan-core's NixOS module pinningnix.registry.nixpkgs.flake = nixpkgs(a path pin, which makes the source a runtime dependency of/etc/nix/registry.json) plusclan-cli's own reference to the nixpkgs source it evaluates against.The same path will be in every device's closure too (VM mode, home devices) — the same 205 MB over the same home line, per device.
Fix (either alone helps; both are needed to get the path out of the wire entirely)
Pin the registry by reference, not by path. In the gateway (and device) module set
nix.registry.nixpkgs.to = { type = "github"; owner = "NixOS"; repo = "nixpkgs"; rev = <the flake's locked rev>; }(frominputs.nixpkgs.rev/narHash), overriding clan-core'sflake =pin./etc/nix/registry.jsonthen holds a reference and the source leaves the closure by that edge. Verify withnix-store --query --referrers— onlyclan-cli/clan-runtimeshould remain.Let the target fetch the source itself for the edge that remains. The path is content-addressed by the input's
narHash, sonix flake prefetch github:NixOS/nixpkgs/<rev>ON THE GATEWAY produces the identical/nix/store/…-sourcebefore the copy runs — at datacentre speed from GitHub instead of home-uplink speed from the laptop. The natural home is the #1764substituteAheadstep (internal/clan/adapter.go) and its enrollment twin: before thenix copy, prefetch the flake's locked inputs on the target (nix flake prefetchfor eachtype = githubinput inflake.lock, pinned by rev+narHash — ADR 0272 §6, exact revision, never latest). Best-effort/fail-open like the rest of substitute-ahead: a miss just means the copy pushes it as today.Either way, pin it with a test the way
deploy_substitute_test.gopins the flag: the gateway toplevel's unsigned closure must not contain a path whoseflake.nixdescription is nixpkgs' — or, simpler, the unsigned byte total of the gateway closure has a ceiling (say 150 MB) that fails the build when crossed, so the next accidental 200 MB cannot land silently.Out of scope here, noted for ADR 0272's slice
sops-install-secrets(50 MB) and our Caddy (48 MB) are legitimately built here today; they are exactly what the Mātou cache (ADR 0275, #1801) exists to serve, and they move there under #1768's sibling work, not this ticket.Relates to: #1764, #699, #1765, ADR 0272 §1/§6, ADR 0275, #1801, #1753 (the device's 2.6 GB pull — check whether the same
sourceis in it).swarm-claim host=bens-mac-04 run=30980
(automated multi-host claim — lowest live claim id works this ticket)
close-report for #1803 — status
success✅ close-report gates passed — every claim verified against main; issue closed.
envelope