refactor: move ci options to services.hyperhive.forge.ci

This commit is contained in:
atlas 2026-05-31 23:52:57 +02:00
commit a8e8c50a30

View file

@ -5,7 +5,7 @@
...
}:
let
cfg = config.services.hyperhive.ci;
cfg = config.services.hyperhive.forge.ci;
forgeCfg = config.services.hyperhive.forge;
# hive-c0re writes its own admin token here on first forge startup.
@ -67,7 +67,7 @@ in
# Auto-registration: on first boot the container fetches a runner
# registration token from the forge's admin API using the core token
# hive-c0re writes to /var/lib/hyperhive/forge-core-token. No manual
# token handling needed — `ci.enable = true` is the full operator
# token handling needed — `forge.ci.enable = true` is the full operator
# bootstrap. Registration flow: preStart calls the Forgejo admin API,
# writes the token to /run/hive-ci/runner-token, runner registers and
# persists credentials to stateDir — token file ignored on next boot.
@ -77,7 +77,7 @@ in
# nspawn containers can't create the user-namespaces that nix sandboxing
# requires. See docs/gotchas.md.
options.services.hyperhive.ci = {
options.services.hyperhive.forge.ci = {
enable = lib.mkOption {
type = lib.types.bool;
default = false;
@ -142,7 +142,7 @@ in
{
assertion = forgeCfg.enable;
message = ''
services.hyperhive.ci.enable = true requires
services.hyperhive.forge.ci.enable = true requires
services.hyperhive.forge.enable = true the runner registers
against the hive-forge Forgejo instance.
'';