feat(nix): move the forge host options under services.hyperhive.swarm
Forgejo is a swarm-global service, so its operator-facing host options move to services.hyperhive.swarm.forge (and .swarm.forge.ci) as the first of the namespace consolidation. Existing hive configs keep evaluating: swarm-renames.nix maps every moved leaf with mkRenamedOptionModule, which also emits a deprecation warning naming both the old and new path, so an operator is told what to rename rather than discovering it from a failed eval. The per-agent hyperhive.forge.url does NOT move. It is a client pointer at whatever forge an agent talks to - it shares a word with the service and nothing else, and the two are already documented as separate option surfaces. Verified by evaluating the host module, since no Rust gate evaluates nix: setting the old paths and reading the new ones yields the values (httpPort 3999, ci.concurrency 7), and config.warnings carries the rename notice.
This commit is contained in:
parent
7a726d1e4e
commit
38c222fadd
8 changed files with 78 additions and 24 deletions
|
|
@ -5,8 +5,8 @@
|
|||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.services.hyperhive.forge.ci;
|
||||
forgeCfg = config.services.hyperhive.forge;
|
||||
cfg = config.services.hyperhive.swarm.forge.ci;
|
||||
forgeCfg = config.services.hyperhive.swarm.forge;
|
||||
gatewayCfg = config.services.hyperhive.gateway;
|
||||
networkCfg = config.services.hyperhive.network;
|
||||
tlsCfg = config.services.hyperhive.tls;
|
||||
|
|
@ -52,14 +52,14 @@ in
|
|||
# nspawn containers can't create the user-namespaces that nix sandboxing
|
||||
# requires. See docs/gotchas.md.
|
||||
|
||||
options.services.hyperhive.forge.ci = {
|
||||
options.services.hyperhive.swarm.forge.ci = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
example = true;
|
||||
description = ''
|
||||
Run a Forgejo Actions runner in a `hive-ci` nixos-container.
|
||||
Grouped under `services.hyperhive.forge` because the runner is
|
||||
Grouped under `services.hyperhive.swarm.forge` because the runner is
|
||||
tightly coupled to the forge instance it registers against.
|
||||
Disabled by default; the internal forge it registers against is
|
||||
always present (mandatory), so enabling this is all that's needed.
|
||||
|
|
@ -142,8 +142,8 @@ in
|
|||
{
|
||||
assertion = forgeCfg.behindGateway;
|
||||
message = ''
|
||||
services.hyperhive.forge.ci.enable requires
|
||||
services.hyperhive.forge.behindGateway = true.
|
||||
services.hyperhive.swarm.forge.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.
|
||||
Set behindGateway = true (it defaults to true alongside
|
||||
|
|
|
|||
Loading…
Reference in a new issue