nixos/uptime-kuma: Apply more hardening settings (#449295)

This commit is contained in:
Luj
2025-10-08 11:13:49 +02:00
committed by GitHub

View File

@@ -53,6 +53,7 @@ in
serviceConfig = {
Type = "simple";
StateDirectory = "uptime-kuma";
StateDirectoryMode = "750";
DynamicUser = true;
ExecStart = "${cfg.package}/bin/uptime-kuma-server";
Restart = "on-failure";
@@ -60,18 +61,20 @@ in
CapabilityBoundingSet = "";
LockPersonality = true;
MemoryDenyWriteExecute = false; # enabling it breaks execution
MountAPIVFS = true;
NoNewPrivileges = true;
PrivateDevices = true;
PrivateMounts = true;
PrivateTmp = true;
PrivateUsers = true;
ProtectClock = true;
ProtectControlGroups = true;
ProtectControlGroups = "strict";
ProtectHome = true;
ProtectHostname = true;
ProtectKernelLogs = true;
ProtectKernelModules = true;
ProtectKernelTunables = true;
ProtectProc = "noaccess";
ProtectProc = "invisible";
ProtectSystem = "strict";
RemoveIPC = true;
RestrictAddressFamilies = [