Watch
0
0
Fork
You've already forked hyperhive
0

swarm-ui: package option moves to deploy.swarm-controller.ui.package

The swarm UI has no switch of its own since it runs wherever the
controller runs; its package option follows it under
deploy.swarm-controller.ui. deploy.swarm-ui.package and
swarm.ui.package stay as renames and warn at evaluation. The flake's
default, the vhost root and the module-eval stub use the new path.
This commit is contained in:
atlas 2026-10-15 23:16:07 +02:00 • committed by mara
commit 1302288474
6 changed files with 37 additions and 12 deletions

View file

@ -21,11 +21,11 @@ let
# this UI was left out of that overlay entirely (an operator with a
# stylix-themed host saw the dashboard in their own colours but this
# UI still on the default Catppuccin palette), because nothing here
# ever served a themed `colors.css` in place of `deployCfg.swarm-ui.package`'s own.
# ever served a themed `colors.css` in place of `deployCfg.swarm-controller.ui.package`'s own.
# Detection + CSS-generation is shared (`./stylix-theme.nix`).
#
# No package-copy derivation: this vhost has exactly one location
# serving `deployCfg.swarm-ui.package` (unlike hive-c0re's `servedFrontend`, which
# serving `deployCfg.swarm-controller.ui.package` (unlike hive-c0re's `servedFrontend`, which
# backs both the dashboard root AND every per-agent gateway route, so
# a single swapped tree covers both) — an `= /static/colors.css`
# exact-match location overriding just that one file, same idiom
@ -83,10 +83,11 @@ in
'')
];
# ⚠️ `services.hyperhive.swarm.ui` is not a namespace. Its `package` lives
# under `deploy.swarm-ui`, and the `swarm.ui` paths survive purely as
# ⚠️ Neither `services.hyperhive.swarm.ui` nor `deploy.swarm-ui` is a
# namespace for anything but the old spellings: the UI's `package` lives
# under `deploy.swarm-controller.ui`, and the old paths survive purely as
# rename/removal entries in ./deploy.nix.
options.services.hyperhive.deploy.swarm-ui.package = lib.mkOption {
options.services.hyperhive.deploy.swarm-controller.ui.package = lib.mkOption {
type = lib.types.package;
defaultText = lib.literalExpression "hyperhive.packages.\${system}.swarm-ui";
description = ''
@ -187,7 +188,7 @@ in
extraConfig = gatewayCfg.lib.securityHeaders;
locations = {
"/" = {
root = "${deployCfg.swarm-ui.package}";
root = "${deployCfg.swarm-controller.ui.package}";
extraConfig = ''
${swarmAuthRequest}
# SPA: any path the bundle routes client-side is served the
@ -198,7 +199,7 @@ in
}
// lib.optionalAttrs (stylixThemeColors != null) {
# Stylix theming (see the `let` block above): overrides just
# this one file from `deployCfg.swarm-ui.package`'s own static root, rather
# this one file from `deployCfg.swarm-controller.ui.package`'s own static root, rather
# than copying the whole tree to change one file inside it —
# nginx resolves the more specific `=` exact match over the
# `/` prefix root above, so this simply doesn't exist (falling