summary refs log tree commit diff
path: root/nixos/modules/services/continuous-integration/hercules-ci-agent
diff options
context:
space:
mode:
authorlf- <lf-@users.noreply.github.com>2020-09-09 00:31:27 -0700
committerlf- <lf-@users.noreply.github.com>2020-10-31 01:35:56 -0700
commitb37bbca521556d30e564896eea56b41d63324fdf (patch)
treedff16af1c82314e010a1350c263d2f97426c16c9 /nixos/modules/services/continuous-integration/hercules-ci-agent
parent2df221ec8a95566ba771f102fd421c12b41d875c (diff)
downloadnixpkgs-b37bbca521556d30e564896eea56b41d63324fdf.tar
nixpkgs-b37bbca521556d30e564896eea56b41d63324fdf.tar.gz
nixpkgs-b37bbca521556d30e564896eea56b41d63324fdf.tar.bz2
nixpkgs-b37bbca521556d30e564896eea56b41d63324fdf.tar.lz
nixpkgs-b37bbca521556d30e564896eea56b41d63324fdf.tar.xz
nixpkgs-b37bbca521556d30e564896eea56b41d63324fdf.tar.zst
nixpkgs-b37bbca521556d30e564896eea56b41d63324fdf.zip
nixos/modules: fix systemd start rate-limits
These were broken since 2016:
https://github.com/systemd/systemd/commit/f0367da7d1a61ad698a55d17b5c28ddce0dc265a
since StartLimitIntervalSec got moved into [Unit] from [Service].
StartLimitBurst has also been moved accordingly, so let's fix that one
too.

NixOS systems have been producing logs such as:
/nix/store/wf98r55aszi1bkmln1lvdbp7znsfr70i-unit-caddy.service/caddy.service:31:
Unknown key name 'StartLimitIntervalSec' in section 'Service', ignoring.

I have also removed some unnecessary duplication in units disabling
rate limiting since setting either interval or burst to zero disables it
(https://github.com/systemd/systemd/blob/ad16158c10dfc3258831a9ff2f1a988214f51653/src/basic/ratelimit.c#L16)
Diffstat (limited to 'nixos/modules/services/continuous-integration/hercules-ci-agent')
-rw-r--r--nixos/modules/services/continuous-integration/hercules-ci-agent/default.nix3
1 files changed, 1 insertions, 2 deletions
diff --git a/nixos/modules/services/continuous-integration/hercules-ci-agent/default.nix b/nixos/modules/services/continuous-integration/hercules-ci-agent/default.nix
index d2e7e8e18f9..79d1ce58054 100644
--- a/nixos/modules/services/continuous-integration/hercules-ci-agent/default.nix
+++ b/nixos/modules/services/continuous-integration/hercules-ci-agent/default.nix
@@ -25,19 +25,18 @@ in
   ];
 
   config = mkIf cfg.enable {
-
     systemd.services.hercules-ci-agent = {
       wantedBy = [ "multi-user.target" ];
       after = [ "network-online.target" ];
       wants = [ "network-online.target" ];
       path = [ config.nix.package ];
+      startLimitBurst = 30 * 1000000; # practically infinite
       serviceConfig = {
         User = "hercules-ci-agent";
         ExecStart = command;
         ExecStartPre = testCommand;
         Restart = "on-failure";
         RestartSec = 120;
-        StartLimitBurst = 30 * 1000000; # practically infinite
       };
     };