Caddy: bring back tailscale depenency and restart interval

This commit is contained in:
Toast 2024-07-18 23:26:47 +02:00
parent c322de5757
commit 79a247d9e6

View file

@ -1,4 +1,4 @@
{config, ...}: let
{config, lib, ...}: let
manualHostname = "manual.everest.tailscale";
in {
services.caddy = {
@ -26,4 +26,12 @@ in {
};
};
services.dnsmasq.settings.cname = ["${manualHostname},everest"];
systemd = {
units.tailscaled.requiredBy = ["caddy.service"];
# We have somewhat frequent power outages, and our ISP router takes
# ages to boot up. If I don't add a delay, traefik tries to bind to
# the tailscale interface before it's ready, making it crash too much
# in too little time
services.caddy.serviceConfig.RestartSec = lib.mkForce "120s";
};
}