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
38 lines
1.2 KiB
Nix
38 lines
1.2 KiB
Nix
# 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, 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
|
|
# the flake has no lock.
|
|
{
|
|
description = "swarm-builder: an agent config built on agent-base";
|
|
|
|
inputs = {
|
|
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,
|
|
hyperhive-docs,
|
|
agent,
|
|
...
|
|
}:
|
|
{
|
|
packages.x86_64-linux.check =
|
|
(hyperhive.nixosConfigurations.agent-base.extendModules {
|
|
modules = [
|
|
agent.nixosModules.default
|
|
{ services.hyperhive.agent.docs.source = hyperhive-docs.outPath; }
|
|
];
|
|
}).config.system.build.toplevel;
|
|
};
|
|
}
|