nixos/vector: align service restart policy with upstream

Restart vector 5 times within 10s on exit. The upstream systemd unit
uses the same values.
This commit is contained in:
Vincent Haupert 2023-12-05 17:19:52 +01:00 committed by Yt
parent 7b050ed276
commit 44522d8478

View file

@ -51,13 +51,17 @@ in
{
ExecStart = "${getExe cfg.package} --config ${validateConfig conf}";
DynamicUser = true;
Restart = "no";
Restart = "always";
StateDirectory = "vector";
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
AmbientCapabilities = "CAP_NET_BIND_SERVICE";
# This group is required for accessing journald.
SupplementaryGroups = mkIf cfg.journaldAccess "systemd-journal";
};
unitConfig = {
StartLimitIntervalSec = 10;
StartLimitBurst = 5;
};
};
};
}