Fix llm-agents binary cache not being applied; drop dead ai trail (flakes-162n)
cache.numtide.com was whitelisted via extra-trusted-substituters but never added to substituters, so all llm-agents packages built from source. Also mixins/home/trails/ai.nix was never imported.
Summary of Changes
Root cause. github:numtide/llm-agents.nix does declare a binary cache in its
nixConfig (extra-substituters = [ "https://cache.numtide.com" ]), and that cache is
fully populated — all 7 referenced packages return HTTP 200 for their narinfo. But Nix
ignores a flake’s nixConfig unless the setting is whitelisted or accept-flake-config
is on, so every command printed:
warning: ignoring untrusted flake configuration setting 'extra-substituters'
packs/nixos/common/settings/nix/llm-agents.nix used extra-trusted-substituters, which
only permits a client to opt in to that substituter; it never joins the real
substituters list. nix show-config confirmed cache.numtide.com was absent from
substituters, so llm-agents packages were built from source.
Measured cost on codex + ck + beads:
- before: 11 derivations built (Rust codex, Go toolchain, dolt, ck pulling onnxruntime + openvino)
- after: 0 built, 1.1 GiB fetched
Changes.
packs/nixos/common/settings/nix/llm-agents.nix:nix.settings.extra-trusted-substituters->nix.settings.extra-substituters. Theextra-trusted-public-keysline was already correct and is unchanged.- Deleted
mixins/home/trails/ai.nix(and with it the now-emptymixins/home/trails/). Nothing imported it — mixins are only reachable by explicit import, and the auto-discovery inflake/home-configs.nixandflake/activate-home.nixonly scansmixins/home/hostsandmixins/home/containers. It held the only references tock,beads, and a pinneddoltoverride, which is why llm-agents felt mostly unused.
Verification.
nix fmtreported the file already correctly formatted.- Generated nix.conf for host
pcnow containsextra-substituters = https://cache.numtide.com, withsubstituterskeeping the CN mirror ordering frommixins/nixos/lan/cn/mirrors.nix(tuna, then cache.nixos.org, then numtide appended). - Dry-run against the live package set with the post-switch substituter list: nothing to build.
Still live from llm-agents (so the input is still needed): claude-code (also
programs.claude-code.package), agent-browser, rtk, opencode, codex via the
autowired packs/home/common/ai/llm-agents.nix; plus opencode and claude-code in
mixins/home/containers/spacebot.nix.
Notes.
- This is a system-level setting, so it needs
mise run _switch-hostper machine to take effect. - The “ignoring untrusted flake configuration setting” warning will still appear. It is now harmless and redundant: the cache comes from our own nix.conf rather than the flake’s nixConfig.
trusted-substitutersis now empty where it previously listed cache.numtide.com. Not a regression — opting in is unnecessary once it is a default substituter.