unbork main?

This commit is contained in:
müde 2026-08-06 00:12:28 +02:00
commit b5066ad061

View file

@ -255,13 +255,26 @@ in
# instances of the `container@.service` template. # instances of the `container@.service` template.
before = [ "container@hive-gateway.service" ]; before = [ "container@hive-gateway.service" ];
requiredBy = [ "container@hive-gateway.service" ]; requiredBy = [ "container@hive-gateway.service" ];
# The issuance below needs the swarm root key on disk. When this # The issuance below needs the swarm root key on disk, and (for the
# host generates it (single-host swarm) that unit must have run; # services leaf) the services sub-CA it signs under. When this host
# when the operator provides it there is no unit to wait for, so # generates them (single-host swarm) both units must have run first;
# the dependency is conditional rather than a unit that exists and # when the operator provides the material there is no unit to wait
# does nothing. # for, so the dependency is conditional rather than a unit that
after = lib.optional swarmCaCfg.autoConfigure "swarm-ca.service"; # exists and does nothing.
requires = lib.optional swarmCaCfg.autoConfigure "swarm-ca.service"; #
# Without waiting for swarm-services-ca specifically, this unit races
# it: if hive-tls-ca finishes first, it finds no services-ca.pem yet,
# silently skips signing the services leaf (the same as "operator
# hasn't set one up"), and the gateway comes up with a vhost pointed
# at a cert that was never written.
after = lib.optionals swarmCaCfg.autoConfigure [
"swarm-ca.service"
"swarm-services-ca.service"
];
requires = lib.optionals swarmCaCfg.autoConfigure [
"swarm-ca.service"
"swarm-services-ca.service"
];
path = [ pkgs.openssl ]; path = [ pkgs.openssl ];
serviceConfig = { serviceConfig = {
Type = "oneshot"; Type = "oneshot";