deploy: move the forge CI runner toggle out of swarm
Last of the swarm.* -> deploy.* moves for the enable-shaped options. Whether this host also runs the CI runner is a per-machine decision, so it was sitting in the namespace that has to be identical swarm-wide. Renames all five options, not just enable: name, concurrency, labels and package all describe the runner THIS host would run, and leaving them behind would keep the original defect for four more options. One rename entry each, because ci is a plain attrset rather than a submodule type, so there is no parent path to rename in one go. deploy.forgejo is the name deploy.nix's own header already specifies, including this exact case -- "ci (does this host run the runner too) is exactly that shape". It is the only entry with no enable: the forge is not optional, it deploys with hyperhive itself, so running the runner is the only deployment decision it has. Also fixes hive-c0re/src/forge/ci_runner.rs, whose doc comment named services.hyperhive.forge.ci.enable -- missing the swarm. segment, so it had never resolved to a real option.
This commit is contained in:
parent
33fafc8c19
commit
4423da4899
6 changed files with 47 additions and 12 deletions
|
|
@ -5,7 +5,7 @@
|
|||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.services.hyperhive.swarm.forge.ci;
|
||||
cfg = config.services.hyperhive.deploy.forgejo.ci;
|
||||
forgeCfg = config.services.hyperhive.swarm.forge;
|
||||
gatewayCfg = config.services.hyperhive.gateway;
|
||||
networkCfg = config.services.hyperhive.network;
|
||||
|
|
@ -76,7 +76,7 @@ in
|
|||
# nspawn containers can't create the user-namespaces that nix sandboxing
|
||||
# requires. See docs/gotchas.md.
|
||||
|
||||
options.services.hyperhive.swarm.forge.ci = {
|
||||
options.services.hyperhive.deploy.forgejo.ci = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
|
|
@ -166,7 +166,7 @@ in
|
|||
{
|
||||
assertion = forgeCfg.behindGateway;
|
||||
message = ''
|
||||
services.hyperhive.swarm.forge.ci.enable requires
|
||||
services.hyperhive.deploy.forgejo.ci.enable requires
|
||||
services.hyperhive.swarm.forge.behindGateway = true.
|
||||
The CI container runs with a private network namespace and
|
||||
reaches the forge through the gateway vhost on the bridge IP.
|
||||
|
|
|
|||
Loading…
Reference in a new issue