Watch
0
0
Fork
You've already forked hyperhive
0

images: slim OCI images of the swarm daemons from nix

This commit is contained in:
atlas 2026-11-19 09:37:41 +01:00 • committed by mara
commit 29ca381114

View file

@ -129,6 +129,29 @@ let
binPkgs = lib.mapAttrs mkBinPackage daemonBins // {
hivectl = hivectlPkg;
};
# The daemons that get an OCI image (../images). Bound here so the image
# set can read them; the attributes below `inherit` them.
swarm-controller = mkBinPackage "swarm-controller" "hyperhive swarm-level controller daemon";
swarm-nats-auth = mkBinPackage "swarm-nats-auth" "hyperhive swarm queue auth-callout responder";
swarm-logs-auth = mkBinPackage "swarm-logs-auth" "hyperhive swarm log store agent auth responder";
swarm-metrics-auth = mkBinPackage "swarm-metrics-auth" "hyperhive swarm metrics store Grafana auth responder";
swarm-notify-router = mkBinPackage "swarm-notify-router" "hyperhive swarm notification router";
swarm-ci-metrics = mkBinPackage "swarm-ci-metrics" "hyperhive swarm CI run poller";
imageSet = import ../images {
inherit pkgs lib;
packages = {
inherit
swarm-controller
swarm-nats-auth
swarm-logs-auth
swarm-metrics-auth
swarm-notify-router
swarm-ci-metrics
;
};
};
in
{
# All workspace binaries in one derivation — a symlinkJoin over the
@ -155,21 +178,21 @@ in
# `package` option, and one hive in a swarm runs it, so folding it
# into the core bundle would put it in every hive's closure to no end.
# Uses the same per-bin extractor, just bound on its own.
swarm-controller = mkBinPackage "swarm-controller" "hyperhive swarm-level controller daemon";
inherit swarm-controller;
# The queue's auth-callout responder. Out of `daemonBins` for the same
# reason as the two above and one more: it runs *inside* the swarm-nats
# container, not on the host, so it belongs in that container's closure
# rather than every hive's.
swarm-nats-auth = mkBinPackage "swarm-nats-auth" "hyperhive swarm queue auth-callout responder";
inherit swarm-nats-auth;
# The log store gateway's `auth_request` responder for agents. Out of
# `daemonBins` like the responder above: it runs on the log store's host only.
swarm-logs-auth = mkBinPackage "swarm-logs-auth" "hyperhive swarm log store agent auth responder";
inherit swarm-logs-auth;
# The metrics store gateway's `auth_request` responder for Grafana's bearer. Out
# of `daemonBins` like the two above: it runs on the metrics store's host only.
swarm-metrics-auth = mkBinPackage "swarm-metrics-auth" "hyperhive swarm metrics store Grafana auth responder";
inherit swarm-metrics-auth;
# The matrix container's control binary; `mint` publishes the sender token. Out of `daemonBins` for
# "runs *inside* a container, not on the host" reason as the responder
@ -182,9 +205,9 @@ in
# reason: it runs inside its own container, not on the host.
swarm-review-classifier = mkBinPackage "swarm-review-classifier" "hyperhive review classifier try-out daemon";
swarm-builder = mkBinPackage "swarm-builder" "hyperhive swarm builder: agent config build checks";
swarm-ci-metrics = mkBinPackage "swarm-ci-metrics" "hyperhive swarm CI run poller";
inherit swarm-ci-metrics;
swarm-claude-login = mkBinPackage "swarm-claude-login" "hyperhive claude login minter";
swarm-notify-router = mkBinPackage "swarm-notify-router" "hyperhive swarm notification router";
inherit swarm-notify-router;
swarm-stt = mkBinPackage "swarm-stt" "hyperhive swarm speech-to-text service";
# The only process allowed to write swarm-authelia's users database —
@ -306,3 +329,5 @@ in
docs-deploy = docsAttrs.deploy;
docs-agent = docsAttrs.agent;
}
# One `image-<daemon>` per entry of ../images. CI evaluates them and builds none.
// lib.mapAttrs' (n: v: lib.nameValuePair "image-${n}" v) imageSet.images