From fb1464bd07c10db0b322ada8d6d40f4b5dcada1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Sun, 16 Apr 2023 08:00:08 +0300 Subject: [PATCH] headscale: configure restart policies OICD is an online dependency that takes time --- configuration.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/configuration.nix b/configuration.nix index 3b1ea0e..f68f68a 100644 --- a/configuration.nix +++ b/configuration.nix @@ -689,6 +689,16 @@ in { ]; }; + headscale = { + unitConfig.StartLimitIntervalSec = "5m"; + + # Allow restarts for up to a minute. A start + # itself may take a while, thus the window of restart + # is higher. + unitConfig.StartLimitBurst = 50; + serviceConfig.RestartSec = 1; + }; + matrix-synapse = let # TODO https://github.com/NixOS/nixpkgs/pull/222336 replace with `preStart` secretsScript = pkgs.writeShellScript "write-secrets" ''