headscale: configure restart policies

OICD is an online dependency that takes time
This commit is contained in:
Motiejus Jakštys 2023-04-16 08:00:08 +03:00
parent d621307248
commit fb1464bd07
1 changed files with 10 additions and 0 deletions

View File

@ -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" ''