Watch
0
0
Fork
You've already forked hyperhive
0

swarm-nats gateway cert reloads nginx without blocking the switch

nixos-rebuild switch no longer hangs when nginx is (re)started in the
same transaction: the cert unit is Before=nginx, so its synchronous
reload and nginx's queued start job waited on each other. The reload is
now queued with --no-block try-reload-or-restart, as the nixpkgs ACME
module does.
This commit is contained in:
atlas 2026-10-20 21:20:24 +02:00
commit b4dbd7d1c3
3 changed files with 8 additions and 4 deletions

View file

@ -434,6 +434,9 @@ let
&& !(lib.elem "nginx.service" (copy.requiredBy or [ ]))
&& lib.hasInfix "throwaway self-signed" copy.script
&& lib.hasInfix "chgrp nginx" copy.script
&& lib.hasInfix "systemctl --no-block try-reload-or-restart nginx.service" copy.script
&& !(lib.hasInfix "systemctl reload" copy.script)
&& !(lib.hasInfix "is-active" copy.script)
&& lib.hasInfix "systemctl start swarm-nats-gateway-cert.service" s.swarm-bao-nats-tls.script;
}
];