diff --git a/hosts/Emitter.nix b/hosts/Emitter.nix index 85d7390..a19034c 100644 --- a/hosts/Emitter.nix +++ b/hosts/Emitter.nix @@ -117,7 +117,20 @@ }; }; services.statusEmail.enable = true; - systemd.services.burp-client.unitConfig.OnFailure = "status-email@%n.service"; + systemd.services.burp-client = let + retryDelay = 10 * 60; + maxRetries = 3; + in { + unitConfig = { + OnFailure = "status-email@%n.service"; + StartLimitIntervalSec = (maxRetries + 1) * retryDelay; + StartLimitBurst = maxRetries; + }; + serviceConfig = { + Restart = "on-failure"; + RestartSec = retryDelay; + }; + }; # This value determines the NixOS release from which the default # settings for stateful data, like file locations and database versions