move swaggerUiTheme nix option out of c0re's namespace
services.hyperhive.c0re.swaggerUiTheme -> services.hyperhive.gateway.swaggerUiTheme. hive-c0re has no relationship to this option (it's consumed entirely by the gateway's nginx config) since the previous two commits moved the theme files out of hive-c0re/ and gateway to hosting the whole dist itself — the option shouldn't live in c0re's namespace either. Pure option move: default wiring in flake.nix now sets services.hyperhive.gateway.swaggerUiTheme instead of the c0re one; hive-gateway/default.nix reads it via the module's own already-bound cfg (services.hyperhive.gateway) instead of reaching into c0re's. Verified: nix build .#swagger-ui-theme unaffected (same store path, pure option-plumbing change, no content change); a full nixosSystem eval of nixosModules.default resolves the option at its new path and confirms the gateway's /api/docs/ location still aliases the correct store path.
This commit is contained in:
parent
3ef166738c
commit
9efe6f64b6
4 changed files with 21 additions and 16 deletions
|
|
@ -128,7 +128,6 @@
|
||||||
frontend = lib.mkDefault self.packages.${pkgs.stdenv.hostPlatform.system}.frontend;
|
frontend = lib.mkDefault self.packages.${pkgs.stdenv.hostPlatform.system}.frontend;
|
||||||
assets = lib.mkDefault self.packages.${pkgs.stdenv.hostPlatform.system}.assets;
|
assets = lib.mkDefault self.packages.${pkgs.stdenv.hostPlatform.system}.assets;
|
||||||
xdgIcons = lib.mkDefault self.packages.${pkgs.stdenv.hostPlatform.system}.xdg-icons;
|
xdgIcons = lib.mkDefault self.packages.${pkgs.stdenv.hostPlatform.system}.xdg-icons;
|
||||||
swaggerUiTheme = lib.mkDefault self.packages.${pkgs.stdenv.hostPlatform.system}.swagger-ui-theme;
|
|
||||||
hyperhiveFlake = lib.mkDefault "${sources.hyperhiveFlakeSource}";
|
hyperhiveFlake = lib.mkDefault "${sources.hyperhiveFlakeSource}";
|
||||||
# Narrow docs/ source, threaded as its own meta-flake input
|
# Narrow docs/ source, threaded as its own meta-flake input
|
||||||
# so doc edits don't re-hash the whole flake source.
|
# so doc edits don't re-hash the whole flake source.
|
||||||
|
|
@ -143,6 +142,9 @@
|
||||||
agentBaseToplevel = lib.mkDefault self.packages.x86_64-linux.agent-base-toplevel;
|
agentBaseToplevel = lib.mkDefault self.packages.x86_64-linux.agent-base-toplevel;
|
||||||
managerToplevel = lib.mkDefault self.packages.x86_64-linux.ruth-toplevel;
|
managerToplevel = lib.mkDefault self.packages.x86_64-linux.ruth-toplevel;
|
||||||
};
|
};
|
||||||
|
services.hyperhive.gateway.swaggerUiTheme =
|
||||||
|
lib.mkDefault
|
||||||
|
self.packages.${pkgs.stdenv.hostPlatform.system}.swagger-ui-theme;
|
||||||
};
|
};
|
||||||
hive-ci = ./nix/host-modules/hive-ci.nix;
|
hive-ci = ./nix/host-modules/hive-ci.nix;
|
||||||
hive-forge = ./nix/host-modules/hive-forge;
|
hive-forge = ./nix/host-modules/hive-forge;
|
||||||
|
|
|
||||||
|
|
@ -65,19 +65,6 @@
|
||||||
processes to their icon.
|
processes to their icon.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
swaggerUiTheme = lib.mkOption {
|
|
||||||
type = lib.types.package;
|
|
||||||
defaultText = lib.literalExpression "hyperhive.packages.\${system}.swagger-ui-theme";
|
|
||||||
description = ''
|
|
||||||
Full Swagger UI static dist, hyperhive-themed (see
|
|
||||||
`nix/packages/swagger-ui-theme.nix`, built on
|
|
||||||
`nix/packages/swagger-ui-dist.nix`). hive-gateway serves this
|
|
||||||
whole tree directly at `/api/docs/` — hive-c0re hosts none of
|
|
||||||
it, only the dynamic `/api/openapi.json` route. Override to
|
|
||||||
ship a custom theme (or the plain vendored dist) without a
|
|
||||||
hive-c0re rebuild.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
hyperhiveFlake = lib.mkOption {
|
hyperhiveFlake = lib.mkOption {
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
defaultText = lib.literalMD "the hyperhive flake's own filtered source store path";
|
defaultText = lib.literalMD "the hyperhive flake's own filtered source store path";
|
||||||
|
|
|
||||||
|
|
@ -27,8 +27,9 @@ let
|
||||||
# Full hyperhive-themed Swagger UI dist — nginx serves this whole
|
# Full hyperhive-themed Swagger UI dist — nginx serves this whole
|
||||||
# tree straight from the store at /api/docs/, no hive-c0re fallback
|
# tree straight from the store at /api/docs/, no hive-c0re fallback
|
||||||
# (see vhosts.nix's `swaggerUiLocations` and
|
# (see vhosts.nix's `swaggerUiLocations` and
|
||||||
# nix/packages/swagger-ui-{dist,theme}.nix).
|
# nix/packages/swagger-ui-{dist,theme}.nix). Own option under this
|
||||||
swaggerUiTheme = config.services.hyperhive.c0re.swaggerUiTheme;
|
# module (not c0re's) — hive-c0re has no relationship to it.
|
||||||
|
swaggerUiTheme = cfg.swaggerUiTheme;
|
||||||
|
|
||||||
# Self-signed TLS is the implicit floor: when neither an operator cert
|
# Self-signed TLS is the implicit floor: when neither an operator cert
|
||||||
# (`tls.certDir`) nor ACME (`tls.acme.enable`) is configured, the gateway
|
# (`tls.certDir`) nor ACME (`tls.acme.enable`) is configured, the gateway
|
||||||
|
|
|
||||||
|
|
@ -254,6 +254,21 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
swaggerUiTheme = lib.mkOption {
|
||||||
|
type = lib.types.package;
|
||||||
|
defaultText = lib.literalExpression "hyperhive.packages.\${system}.swagger-ui-theme";
|
||||||
|
description = ''
|
||||||
|
Full Swagger UI static dist, hyperhive-themed (see
|
||||||
|
`nix/packages/swagger-ui-theme.nix`, built on
|
||||||
|
`nix/packages/swagger-ui-dist.nix`). The gateway serves this
|
||||||
|
whole tree directly at `/api/docs/` — hive-c0re hosts none of
|
||||||
|
it, only the dynamic `/api/openapi.json` route (proxied
|
||||||
|
through, unaffected by this option). Override to ship a
|
||||||
|
custom theme (or the plain vendored dist) without a gateway
|
||||||
|
rebuild.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
hsts = {
|
hsts = {
|
||||||
enable = lib.mkOption {
|
enable = lib.mkOption {
|
||||||
type = lib.types.bool;
|
type = lib.types.bool;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue