nix(gateway): factor the self-signed condition into a shared option
Per review: the `tls.certDir == null && !tls.acme.enable` derivation was duplicated in hive-gateway, hive-tls, and hive-ci. Expose it once as a read-only internal option `services.hyperhive.gateway.useSelfSigned` (the gateway module's single source of truth) and have hive-tls and hive-ci consume it instead of re-deriving. Eval-proven: gateway.useSelfSigned is true on the self-signed default / false with tls.certDir, and the hive-tls (HIVE_TLS_CA_PATH) + hive-ci (NODE_EXTRA_CA_CERTS) wiring derives correctly from it.
This commit is contained in:
parent
9f03cf31ba
commit
3b8e77c1c1
3 changed files with 24 additions and 6 deletions
|
|
@ -16,7 +16,9 @@ let
|
|||
# `upload-artifact`, which POSTs to the ROOT_URL-derived artifact endpoint)
|
||||
# reject the chain, since Node trusts only its bundled CA bundle, not the
|
||||
# system store. Trust the hive CA explicitly via NODE_EXTRA_CA_CERTS below.
|
||||
useSelfSigned = gatewayCfg.tls.certDir == null && !gatewayCfg.tls.acme.enable;
|
||||
# `gateway.useSelfSigned` is the gateway module's single source of truth
|
||||
# for the self-signed condition (no duplicated derivation here).
|
||||
useSelfSigned = gatewayCfg.useSelfSigned;
|
||||
caHostPath = "${tlsCfg.stateDir}/ca.pem";
|
||||
caContainerPath = "/run/hive-ca/ca.pem";
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue