added some security options

This commit is contained in:
stuce-bot 2025-06-10 12:32:37 +02:00
parent 85bae9d67d
commit 95ffbf6300

View file

@ -79,6 +79,30 @@
serviceConfig = { serviceConfig = {
ExecStart = "${cfg.package}/bin/sTodo"; ExecStart = "${cfg.package}/bin/sTodo";
Restart = "always"; Restart = "always";
User = "sTodo";
Group = "sTodo";
StateDirectory = "sTodo";
StateDirectoryMode = "0700";
AmbientCapabilities = "";
CapabilityBoundingSet = "";
DeviceAllow = "";
LockPersonality = true;
MemoryDenyWriteExecute = true;
NoNewPrivileges = true;
PrivateDevices = true;
PrivateUsers = true;
ProtectClock = true;
ProtectControlGroups = true;
ProtectHome = "read-only";
ProtectHostname = true;
ProtectKernelLogs = true;
ProtectKernelModules = true;
ProtectKernelTunables = true;
ProtectProc = "noaccess";
ProtectSystem = "strict";
}; };
environment = { environment = {
YESOD_PORT = "${toString cfg.port}"; YESOD_PORT = "${toString cfg.port}";