swarm-bao-agent-pki (the agent PKI mount, its root and role, and the
listener's trust in it, with the restart of openbao) and
swarm-bao-agent-ssh-policy (the agent SSH CA mount and its role) are
their own module, with the bindings only they use. The mount names, the
cached agent CA, the listener bundle and the unit timeouts the host
module also reads join lib/swarm-bao-shared.nix.
Refs #6820
The 17 swarm-bao-*-policy units that write a service's own policy and
cert-auth role (Grafana, the collector, the queue and store responders,
the CI runner and poller, the classifier, the builder, the cache, the
archive, the claude login minter, the notification router, stt and the
forge publisher) are their own module, with the reader lists and the unit
shape they use. The stanzas, leaves and unit helpers the host module also
reads join lib/swarm-bao-shared.nix.
Refs #6820
swarm-bao.nix held 5,146 lines in one module. Move two pieces out, with
no change to what it renders:
- lib/swarm-bao-shared.nix: the bindings more than one concern reads
(the TLS directory, the granter's login and unit shape, the leaves
several grants name, the CLI wrapper). swarm-bao.nix and the sibling
modules import it and inherit what they use.
- swarm-bao-operator-viewer.nix: the store's browser-UI login (the
operator viewer policy, the oidc auth config and its role), gated as it
was on the store and its server certificate.
Refs #6820