diff --git a/doc/languages-frameworks/beam.section.md b/doc/languages-frameworks/beam.section.md index 0eb5bcbce699..a6c22f46d912 100644 --- a/doc/languages-frameworks/beam.section.md +++ b/doc/languages-frameworks/beam.section.md @@ -295,6 +295,8 @@ in ''; Restart = "on-failure"; RestartSec = 5; + }; + unitConfig = { StartLimitBurst = 3; StartLimitInterval = 10; }; diff --git a/nixos/modules/services/cluster/spark/default.nix b/nixos/modules/services/cluster/spark/default.nix index ffec1512d42b..3835564980b6 100644 --- a/nixos/modules/services/cluster/spark/default.nix +++ b/nixos/modules/services/cluster/spark/default.nix @@ -123,9 +123,11 @@ in ExecStart = "${cfg.package}/sbin/start-master.sh"; ExecStop = "${cfg.package}/sbin/stop-master.sh"; TimeoutSec = 300; - StartLimitBurst = 10; Restart = "always"; }; + unitConfig = { + StartLimitBurst = 10; + }; }; spark-worker = lib.mkIf cfg.worker.enable { path = with pkgs; [ @@ -151,9 +153,11 @@ in ExecStart = "${cfg.package}/sbin/start-worker.sh spark://${cfg.worker.master}"; ExecStop = "${cfg.package}/sbin/stop-worker.sh"; TimeoutSec = 300; - StartLimitBurst = 10; Restart = "always"; }; + unitConfig = { + StartLimitBurst = 10; + }; }; }; tmpfiles.rules = [ diff --git a/nixos/modules/services/games/xonotic.nix b/nixos/modules/services/games/xonotic.nix index 736440b5123e..4d181830aaeb 100644 --- a/nixos/modules/services/games/xonotic.nix +++ b/nixos/modules/services/games/xonotic.nix @@ -195,6 +195,8 @@ in Restart = "on-failure"; RestartSec = 10; + }; + unitConfig = { StartLimitBurst = 5; }; }; diff --git a/nixos/modules/services/matrix/conduit.nix b/nixos/modules/services/matrix/conduit.nix index 3d2738c4c3d8..18b86de86e55 100644 --- a/nixos/modules/services/matrix/conduit.nix +++ b/nixos/modules/services/matrix/conduit.nix @@ -157,9 +157,11 @@ in ExecStart = "${cfg.package}/bin/conduit"; Restart = "on-failure"; RestartSec = 10; - StartLimitBurst = 5; UMask = "077"; }; + unitConfig = { + StartLimitBurst = 5; + }; }; }; } diff --git a/nixos/modules/services/networking/fedimintd.nix b/nixos/modules/services/networking/fedimintd.nix index 30e2857f0017..a2155319f96f 100644 --- a/nixos/modules/services/networking/fedimintd.nix +++ b/nixos/modules/services/networking/fedimintd.nix @@ -310,7 +310,6 @@ in Restart = "always"; RestartSec = 10; - StartLimitBurst = 5; UMask = "007"; LimitNOFILE = "100000"; @@ -341,6 +340,9 @@ in "~@privileged" ]; }; + unitConfig = { + StartLimitBurst = 5; + }; } )) ) eachFedimintd; diff --git a/nixos/modules/services/networking/frr.nix b/nixos/modules/services/networking/frr.nix index e26385802af1..dea0c9963462 100644 --- a/nixos/modules/services/networking/frr.nix +++ b/nixos/modules/services/networking/frr.nix @@ -298,7 +298,6 @@ in Nice = -5; Type = "forking"; NotifyAccess = "all"; - StartLimitBurst = "3"; TimeoutSec = 120; WatchdogSec = 60; RestartSec = 5; @@ -309,6 +308,9 @@ in ExecStop = "${pkgs.frr}/libexec/frr/frrinit.sh stop"; ExecReload = "${pkgs.frr}/libexec/frr/frrinit.sh reload"; }; + unitConfig = { + StartLimitBurst = "3"; + }; }; }; diff --git a/nixos/modules/virtualisation/docker-rootless.nix b/nixos/modules/virtualisation/docker-rootless.nix index c1d8ea38a0bb..08cf48ef22fb 100644 --- a/nixos/modules/virtualisation/docker-rootless.nix +++ b/nixos/modules/virtualisation/docker-rootless.nix @@ -82,7 +82,6 @@ in TimeoutSec = 0; RestartSec = 2; Restart = "always"; - StartLimitBurst = 3; LimitNOFILE = "infinity"; LimitNPROC = "infinity"; LimitCORE = "infinity"; @@ -90,6 +89,9 @@ in NotifyAccess = "all"; KillMode = "mixed"; }; + unitConfig = { + StartLimitBurst = 3; + }; }; }; diff --git a/nixos/tests/vault-postgresql.nix b/nixos/tests/vault-postgresql.nix index bf5f1ee8ab7e..129e8ccfce89 100644 --- a/nixos/tests/vault-postgresql.nix +++ b/nixos/tests/vault-postgresql.nix @@ -29,7 +29,7 @@ ]; # Try for about 10 minutes rather than the default of 5 attempts. serviceConfig.RestartSec = 1; - serviceConfig.StartLimitBurst = 600; + unitConfig.StartLimitBurst = 600; }; # systemd.services.vault.unitConfig.RequiresMountsFor = "/run/keys/";