Watch
0
0
Fork
You've already forked hyperhive
0
hyperhive/nix/builder/check-flake/flake.nix
atlas e9c471caeb 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
2026-10-17 13:39:42 +02:00

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;
};
}