move links, adminSync.ignoreUsers and scrapeTargets under their service's deploy namespace
This commit is contained in:
parent
ee591b0546
commit
90272ec3c0
1 changed files with 156 additions and 108 deletions
|
|
@ -391,6 +391,20 @@ in
|
|||
'';
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
# What stays above is what the controller IS to the swarm:
|
||||
# the client id it is registered under, and how stale a
|
||||
# snapshot may read. What the host running it decides is here — the quick
|
||||
# links its UI serves, the accounts its matrix admin sync leaves alone, which two
|
||||
# builds it runs, where its socket lives, and the three credentials it reads
|
||||
# off local disk. `enable` already lives in ./deploy.nix, which also carries
|
||||
# the renames.
|
||||
#
|
||||
# ⚠️ `deploy.swarm-controller`, NOT `deploy.hive-controller`. Both exist:
|
||||
# the latter is hive-c0re's namespace, where `tls.*` lives. A definition on
|
||||
# the wrong one lands on a live, unrelated option rather than failing.
|
||||
options.services.hyperhive.deploy.swarm-controller = {
|
||||
links = lib.mkOption {
|
||||
type = lib.types.listOf (
|
||||
lib.types.submodule {
|
||||
|
|
@ -437,19 +451,18 @@ in
|
|||
'';
|
||||
};
|
||||
|
||||
};
|
||||
matrixAdminSync.ignoreUsers = lib.mkOption {
|
||||
type = lib.types.listOf (lib.types.strMatching "@[^:[:space:]]+:[^[:space:]]+");
|
||||
default = [ ];
|
||||
example = [ "@mara:example.org" ];
|
||||
description = ''
|
||||
Full matrix user ids the controller's operator admin sync never
|
||||
revokes homeserver admin from. The sync revokes admin only from
|
||||
accounts it made admin itself, once their owner leaves authelia's
|
||||
`admins` group; an account listed here keeps admin regardless.
|
||||
'';
|
||||
};
|
||||
|
||||
# What stays above is what the controller IS to the swarm: the quick-links
|
||||
# it publishes, the client id it is registered under, and how stale a
|
||||
# snapshot may read. What the host running it decides is here — which two
|
||||
# builds it runs, where its socket lives, and the three credentials it reads
|
||||
# off local disk. `enable` already lives in ./deploy.nix, which also carries
|
||||
# the renames.
|
||||
#
|
||||
# ⚠️ `deploy.swarm-controller`, NOT `deploy.hive-controller`. Both exist:
|
||||
# the latter is hive-c0re's namespace, where `tls.*` lives. A definition on
|
||||
# the wrong one lands on a live, unrelated option rather than failing.
|
||||
options.services.hyperhive.deploy.swarm-controller = {
|
||||
queue = {
|
||||
natsUrl = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
|
|
@ -662,7 +675,7 @@ in
|
|||
};
|
||||
|
||||
config = lib.mkIf deployCfg.swarm-controller.enable {
|
||||
services.hyperhive.swarm.controller.links = swarmServiceLinks;
|
||||
services.hyperhive.deploy.swarm-controller.links = swarmServiceLinks;
|
||||
|
||||
users.users.swarm-controller = {
|
||||
isSystemUser = true;
|
||||
|
|
@ -848,7 +861,7 @@ in
|
|||
# The merged links list — see `links`' description above for who
|
||||
# contributes to it. Consumed by `GET /api/links`
|
||||
# (swarm-controller/src/startup.rs::load_links).
|
||||
SWARM_CONTROLLER_LINKS = builtins.toJSON cfg.links;
|
||||
SWARM_CONTROLLER_LINKS = builtins.toJSON deployCfg.swarm-controller.links;
|
||||
# Staleness threshold for `GET /api/hives/status` — see
|
||||
# `staleAfterSeconds`' description. Set unconditionally rather
|
||||
# than inside `queueEnv`: it is not a queue coordinate, and
|
||||
|
|
@ -858,7 +871,7 @@ in
|
|||
# The accounts the operator admin sync never revokes. Whitespace-
|
||||
# separated: a matrix user id cannot contain a space. Consumed by
|
||||
# swarm-controller/src/matrix_account/operator_admin.rs.
|
||||
SWARM_CONTROLLER_MATRIX_ADMIN_SYNC_IGNORE_USERS = lib.concatStringsSep " " matrixCfg.adminSync.ignoreUsers;
|
||||
SWARM_CONTROLLER_MATRIX_ADMIN_SYNC_IGNORE_USERS = lib.concatStringsSep " " deployCfg.swarm-controller.matrixAdminSync.ignoreUsers;
|
||||
# Where `GET /api/alerts` reads alerts (swarm-controller/src/alerts.rs).
|
||||
# Every swarm has one Grafana, reached by name wherever it runs. The
|
||||
# token is in the store, written by `swarm-bao-grafana-controller-token`
|
||||
|
|
|
|||
Loading…
Reference in a new issue