deploy: give every option an enable, and name the controller one
Two corrections from review, applied forward on this branch rather than
by rewriting it.
`deploy.<service>` was a bare bool, which makes
`deploy.forgejo = { enable; ci; }` unrepresentable -- the nested
CI-runner sub-option this namespace was designed around. Every entry is
now an attrset with an `enable`, so a second per-host deployment
decision becomes an ordinary addition rather than a migration.
`deploy.controller` is now `deploy.swarm-controller`, consistent with
`deploy.swarm-ui`, which was introduced in the same commit.
89 references rewritten across 24 files -- nix, Rust, docs, and the
repo's own CLAUDE.md.
The prefix-anchored sweep missed exactly one, and it was live code:
hive-tls.nix spells it `hyperhiveCfg.deploy.controller` -- the only
`hyperhiveCfg` prefix among 45 references. A suffix grep
(`\.deploy\.<name>`) finds it; a path-anchored one cannot, because the
head of a reference is whatever alias the reading file happens to bind.
This commit is contained in:
parent
ba5ab313b3
commit
d3b40da1c8
24 changed files with 137 additions and 121 deletions
|
|
@ -29,7 +29,7 @@ let
|
|||
domainBase = if swarmDomain == null then "invalid" else swarmDomain;
|
||||
in
|
||||
{
|
||||
# `enable` moved to `services.hyperhive.deploy.victoriametrics` — see
|
||||
# `enable` moved to `services.hyperhive.deploy.victoriametrics.enable` — see
|
||||
# ./deploy.nix. What stays here is what the store IS: its package,
|
||||
# domain, retention and wiring.
|
||||
options.services.hyperhive.swarm.victoriametrics = {
|
||||
|
|
@ -90,8 +90,8 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf (hyperhiveCfg.enable && deployCfg.victoriametrics) {
|
||||
# The gateway name and the quick-link, both inside `deployCfg.victoriametrics` — that
|
||||
config = lib.mkIf (hyperhiveCfg.enable && deployCfg.victoriametrics.enable) {
|
||||
# The gateway name and the quick-link, both inside `deployCfg.victoriametrics.enable` — that
|
||||
# guard is the load-bearing part. Every hive in a swarm may know this
|
||||
# store exists, but only the host that RUNS it may claim the name; a
|
||||
# client hive declaring the vhost would answer for a service it does not
|
||||
|
|
|
|||
Loading…
Reference in a new issue