Watch
0
0
Fork
You've already forked hyperhive
0

swarm-controller: move the forge concern into its own module

Refs #6897
This commit is contained in:
atlas 2026-11-27 15:47:00 +01:00 • committed by mara
commit a9df331469
2 changed files with 44 additions and 37 deletions

View file

@ -29,7 +29,7 @@ in
lib.mkDefault "https://forge.darkest.space/hyperhive/hyperhive";
# JSON-encoded list of { upstream, dest }, seeded by the controller's
# forge-objects pass (`swarm-controller/src/forge/objects.rs`).
# forge-objects pass (`swarm-controller/src/git_forge/forge/objects.rs`).
systemd.services.swarm-controller.environment.SWARM_CONTROLLER_FORGE_MIRRORS =
builtins.toJSON deployCfg.forgejo.effectiveMirrors;
})

View file

@ -220,17 +220,17 @@ let
# Unconditional: every swarm has a forge, reached by name wherever it runs.
# The token is not here: the daemon reads it from the swarm's secret store at
# start (`forge.rs`), and re-reads it in the background until it is there.
# start (`git_forge/forge.rs`), and re-reads it in the background until it is there.
forgeEnv = {
SWARM_CONTROLLER_FORGE_URL = "https://${forgeCfg.domain}";
# `agent-configs` org avatar for the forge-objects pass
# (`forge/objects.rs`). Only meaningful with forge access, hence here.
# (`git_forge/forge/objects.rs`). Only meaningful with forge access, hence here.
SWARM_CONTROLLER_CONFIG_ORG_AVATAR_PNG =
if deployCfg.swarm-controller.configOrgAvatarPng != null then
"${deployCfg.swarm-controller.configOrgAvatarPng}"
else
"${config.services.hyperhive.deploy.hive-controller.assets}/share/hyperhive/branding/agent-configs.png";
# The swarm services' own forge accounts' avatars (`forge/service_avatars.rs`).
# The swarm services' own forge accounts' avatars (`git_forge/forge/service_avatars.rs`).
SWARM_CONTROLLER_SERVICE_ICON_DIR = "${config.services.hyperhive.deploy.hive-controller.assets}/share/hyperhive/branding";
};
@ -1020,7 +1020,7 @@ in
# `AF_UNIX` for the socket this daemon serves on, plus what its
# outbound clients need: it mints authelia tokens and calls the forge
# over HTTPS (`auth.rs`, `forge.rs`) and reaches the queue over NATS
# over HTTPS (`auth.rs`, `git_forge/forge.rs`) and reaches the queue over NATS
# (`startup.rs`, `status.rs`). `AF_NETLINK` because glibc's
# `getaddrinfo` opens a netlink socket to enumerate local addresses
# before it will return one.