Watch
0
0
Fork
You've already forked hyperhive
0

swarm-builder: give the check flake the hive's docs source

The builder's hyperhive input is the docs-stripped flake source, so an
agent config with docs.enable = true failed to evaluate: docs.source
defaults to reference-docs, built from the missing docs/. Pass the host's
c0re.hyperhiveDocs as a hyperhive-docs input and set docs.source from it,
as the hive's meta flake does.

Fixes #5411
This commit is contained in:
atlas 2026-10-17 08:54:06 +02:00 • committed by mara
commit e9c471caeb
6 changed files with 80 additions and 10 deletions

View file

@ -1,6 +1,8 @@
# The swarm builder's build check: one agent config on hyperhive's agent base,
# composed the way a hive's meta flake composes it, minus the values a hive
# adds (its CA, docs source, claude-code path and ports).
# adds (its CA, claude-code path and ports). The docs source is set the way the
# meta flake sets it: `hyperhive`'s source has no `docs/`, so the default
# `docs.source` fails to evaluate.
#
# Every input is replaced at build time with `--override-input`
# (swarm-builder/src/nix_build.rs), so the URLs below are never fetched and
@ -12,15 +14,25 @@
nixpkgs.url = "flake:nixpkgs";
hyperhive.url = "flake:hyperhive";
hyperhive.inputs.nixpkgs.follows = "nixpkgs";
hyperhive-docs.url = "flake:hyperhive-docs";
hyperhive-docs.flake = false;
agent.url = "flake:agent";
};
outputs =
{ hyperhive, agent, ... }:
{
hyperhive,
hyperhive-docs,
agent,
...
}:
{
packages.x86_64-linux.check =
(hyperhive.nixosConfigurations.agent-base.extendModules {
modules = [ agent.nixosModules.default ];
modules = [
agent.nixosModules.default
{ services.hyperhive.agent.docs.source = hyperhive-docs.outPath; }
];
}).config.system.build.toplevel;
};
}