commit 963b1165e1099474a2955751af1b28d517a07268
parent 6dc6a58481cc559deed92ac3ce3f13a9d0330165
Author: Daniel Barlow <dan@telent.net>
Date: Sun, 29 Nov 2026 21:08:39 +0000
certifix-client: lengthen timeout
if the certifix server is on the WAN, it's easy to arrange
dependencies so that certifix-client doesn't run until dhcpc (or
whatever) has happened. If it's on the LAN and we are using static
addresses (which is probable, we most likely _are_ the dhcp and dns
server) then there's often not a convenient service to make
certifix-client dependent on to make sure the net is working.
Especially if the LAN is a bridge, we can't use s6-rc to say "at least
one, but not necessarily all, of the bridge members are up"
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/modules/tls-certificate/certifix-client.nix b/modules/tls-certificate/certifix-client.nix
@@ -20,10 +20,13 @@ let
in
oneshot {
inherit name;
+ timeout-up = 300;
up = ''
(in_outputs ${name}
ln -sf ${caCertFile} ca-certificate
SSL_CERT_FILE=${caCertFile} ${certifix-client}/bin/certifix-client --subject ${subject} --secret ${secretFile} --key-out key --certificate-out certificate ${serviceUrl}
+ # make sure it worked or exit 1 so that s6-rc can retry
+ test -s certificate
)
'';
}