diff --git a/nixos/modules/services/monitoring/uptime-kuma.nix b/nixos/modules/services/monitoring/uptime-kuma.nix index c673a09832b0..cab1e989c14e 100644 --- a/nixos/modules/services/monitoring/uptime-kuma.nix +++ b/nixos/modules/services/monitoring/uptime-kuma.nix @@ -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 = [