post(caddy): systemd start-rate-limit in 21.03

- https://github.com/NixOS/nixpkgs/pull/97512
This commit is contained in:
MDLeom 2020-11-08 00:17:26 +00:00
parent 3fd090b561
commit 99ac6b142f
No known key found for this signature in database
GPG Key ID: 32D3E28E96A695E8
4 changed files with 8 additions and 4 deletions

View File

@ -101,6 +101,7 @@ in {
environment = mkIf (versionAtLeast config.system.stateVersion "17.09")
{ CADDYPATH = cfg.dataDir; };
startLimitIntervalSec = 86400;
# 21.03+
# https://github.com/NixOS/nixpkgs/pull/97512
# startLimitBurst = 5;
serviceConfig = {
@ -112,7 +113,7 @@ in {
User = "caddyProxy";
Group = "caddyProxy";
Restart = "on-failure";
# <= 20.03
# <= 20.09
StartLimitBurst = 5;
NoNewPrivileges = true;
LimitNPROC = 64;

View File

@ -80,6 +80,7 @@ in {
environment = mkIf (versionAtLeast config.system.stateVersion "17.09" && !isCaddy2)
{ CADDYPATH = cfg.dataDir; };
startLimitIntervalSec = 86400;
# 21.03+
# https://github.com/NixOS/nixpkgs/pull/97512
# startLimitBurst = 5;
serviceConfig = {
@ -91,7 +92,7 @@ in {
User = "caddyProxy";
Group = "caddyProxy";
Restart = "on-failure";
# <= 20.03
# <= 20.09
StartLimitBurst = 5;
NoNewPrivileges = true;
LimitNPROC = 64;

View File

@ -149,6 +149,7 @@ in {
environment = mkIf (versionAtLeast config.system.stateVersion "17.09")
{ CADDYPATH = cfg.dataDir; };
startLimitIntervalSec = 86400;
# 21.03+
# https://github.com/NixOS/nixpkgs/pull/97512
# startLimitBurst = 5;
serviceConfig = {
@ -160,7 +161,7 @@ in {
User = "caddyProxy";
Group = "caddyProxy";
Restart = "on-failure";
# <= 20.03
# <= 20.09
StartLimitBurst = 5;
NoNewPrivileges = true;
LimitNPROC = 64;

View File

@ -124,6 +124,7 @@ in {
environment = mkIf (versionAtLeast config.system.stateVersion "17.09")
{ CADDYPATH = cfg.dataDir; };
startLimitIntervalSec = 86400;
# 21.03+
# https://github.com/NixOS/nixpkgs/pull/97512
# startLimitBurst = 5;
serviceConfig = {
@ -135,7 +136,7 @@ in {
User = "caddyProxy";
Group = "caddyProxy";
Restart = "on-failure";
# <= 20.03
# <= 20.09
StartLimitBurst = 5;
NoNewPrivileges = true;
LimitNPROC = 64;