lol

nixos/caddy: Set systemd unit to restart on-failure whilst ignoring error code 1.

This is what's recommended by systemd for long-running services and
helps with recovering from crashes.

+3 -1
+3 -1
nixos/modules/services/web-servers/caddy/default.nix
··· 376 376 ReadWriteDirectories = cfg.dataDir; 377 377 StateDirectory = mkIf (cfg.dataDir == "/var/lib/caddy") [ "caddy" ]; 378 378 LogsDirectory = mkIf (cfg.logDir == "/var/log/caddy") [ "caddy" ]; 379 - Restart = "on-abnormal"; 379 + Restart = "on-failure"; 380 + RestartPreventExitStatus = 1; 381 + RestartSecs = "5s"; 380 382 381 383 # TODO: attempt to upstream these options 382 384 NoNewPrivileges = true;