nix: split swarm-grafana into service and deploy-mode files
`swarm.grafana` (what the metrics UI is to every hive: container name, domain, metrics port, OIDC client) moves to nix/host-modules/swarm-grafana-service.nix, together with `domainBase`, the only helper it reads besides `cfg`. Everything else -- the `deploy.grafana` options, the whole `config` block including `containers.swarm-grafana`, and the helpers only they read -- stays in nix/host-modules/swarm-grafana.nix, which default.nix now imports alongside the new file. Both halves read `cfg` (`swarm.grafana.oidc.redirectUri` defaults from `cfg.domain`; the config block reads `cfg` throughout). It is an option read, so each file binds it from `config.services.hyperhive.swarm.grafana`. The service file has no `hyperhiveCfg`, so its `swarmDomain` reads `config.services.hyperhive.swarm.domain` directly, as swarm-nats-service.nix does. A pure move: option paths, option definitions and config are unchanged apart from the two comments on either side of the cut, which now name the file the other half lives in. Refs #3742
This commit is contained in:
parent
07ca06dcca
commit
eed53a2b59
3 changed files with 145 additions and 131 deletions
|
|
@ -47,6 +47,7 @@
|
|||
./swarm-nats-service.nix
|
||||
./swarm-nats.nix
|
||||
./swarm-controller.nix
|
||||
./swarm-grafana-service.nix
|
||||
./swarm-grafana.nix
|
||||
./swarm-otel.nix
|
||||
./swarm-snapshot-store.nix
|
||||
|
|
|
|||
Loading…
Reference in a new issue