refactor(nix): move the swarm display name under services.hyperhive.swarm
services.hyperhive.swarmName becomes services.hyperhive.swarm.name, with one mkRenamedOptionModule in hyperhive.nix -- the module that declares it, same convention as the forge and matrix renames, so each migration stays independent of its siblings. hiveName deliberately stays where it is. It names this hive; swarm.name names the group the hive belongs to, and that they now sit one level apart is the distinction rather than an inconsistency. The per-agent hyperhive.swarmName is an internal mirror rendered from the host value and does not move, same split as forge and matrix.
This commit is contained in:
parent
0d23896dbb
commit
30a94d35e9
2 changed files with 22 additions and 8 deletions
|
|
@ -56,8 +56,8 @@ in
|
|||
// lib.optionalAttrs (config.services.hyperhive.hiveName != null) {
|
||||
HYPERHIVE_HIVE_NAME = config.services.hyperhive.hiveName;
|
||||
}
|
||||
// lib.optionalAttrs (config.services.hyperhive.swarmName != null) {
|
||||
HYPERHIVE_SWARM_NAME = config.services.hyperhive.swarmName;
|
||||
// lib.optionalAttrs (config.services.hyperhive.swarm.name != null) {
|
||||
HYPERHIVE_SWARM_NAME = config.services.hyperhive.swarm.name;
|
||||
}
|
||||
// lib.optionalAttrs (!config.services.hyperhive.github.enable) {
|
||||
# GitHub integration is on by default; only signal the OFF override to
|
||||
|
|
|
|||
|
|
@ -7,6 +7,16 @@
|
|||
...
|
||||
}:
|
||||
{
|
||||
# The swarm's display name moved under `swarm` when the swarm-global
|
||||
# settings were consolidated; the hive's own name and domain stayed put,
|
||||
# because they describe this hive rather than the swarm it joins.
|
||||
imports = [
|
||||
(lib.mkRenamedOptionModule
|
||||
[ "services" "hyperhive" "swarmName" ]
|
||||
[ "services" "hyperhive" "swarm" "name" ]
|
||||
)
|
||||
];
|
||||
|
||||
# Top-level hyperhive enable flag. When true, automatically enables
|
||||
# hive-c0re and the on-by-default hyperhive subsystems.
|
||||
options.services.hyperhive.enable = lib.mkEnableOption "hyperhive — the agent swarm coordinator";
|
||||
|
|
@ -39,11 +49,12 @@
|
|||
'';
|
||||
};
|
||||
|
||||
# Human display names for hive + swarm. Distinct from the DNS
|
||||
# domain above (machine-readable) — see
|
||||
# docs/conventions.md::Hive identity for the
|
||||
# domain-vs-name-vs-swarm distinction + the env-var
|
||||
# propagation chain.
|
||||
# Human display name for this hive. Distinct from the DNS domain
|
||||
# above (machine-readable) — see docs/conventions.md::Hive identity
|
||||
# for the domain-vs-name-vs-swarm distinction + the env-var
|
||||
# propagation chain. The swarm's display name is
|
||||
# `services.hyperhive.swarm.name`, one level out: this hive is named
|
||||
# here, the swarm it belongs to is named there.
|
||||
options.services.hyperhive.hiveName = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.str;
|
||||
default = null;
|
||||
|
|
@ -61,7 +72,10 @@
|
|||
'';
|
||||
};
|
||||
|
||||
options.services.hyperhive.swarmName = lib.mkOption {
|
||||
# The one hive-level option that describes something ABOVE the hive,
|
||||
# which is why it sits under `swarm` with the swarm-global services
|
||||
# rather than beside `hiveName`.
|
||||
options.services.hyperhive.swarm.name = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.str;
|
||||
default = null;
|
||||
example = "constellat1on";
|
||||
|
|
|
|||
Loading…
Reference in a new issue