nixos/wakapi: harden systemd service

when using `systemd-analyze security wakapi.service` we went from a 5.9
to a 3.

Changed files
+8 -1
nixos
modules
services
web-apps
+8 -1
nixos/modules/services/web-apps/wakapi.nix
···
Group = config.users.users.wakapi.group;
DynamicUser = true;
ProtectHome = true;
ProtectHostname = true;
ProtectKernelLogs = true;
ProtectKernelModules = true;
ProtectKernelTunables = true;
ProtectProc = "invisible";
-
ProtectSystem = "strict";
RestrictAddressFamilies = [
"AF_INET"
"AF_INET6"
"AF_UNIX"
];
RestrictNamespaces = true;
RestrictRealtime = true;
RestrictSUIDSGID = true;
···
Group = config.users.users.wakapi.group;
DynamicUser = true;
+
PrivateTmp = true;
+
PrivateUsers = true;
+
PrivateDevices = true;
ProtectHome = true;
ProtectHostname = true;
+
ProtectClock = true;
ProtectKernelLogs = true;
ProtectKernelModules = true;
ProtectKernelTunables = true;
+
ProtectControlGroups = true;
+
NoNewPrivileges = true;
ProtectProc = "invisible";
+
ProtectSystem = "full";
RestrictAddressFamilies = [
"AF_INET"
"AF_INET6"
"AF_UNIX"
];
+
CapabilityBoundingSet = "CAP_NET_BIND_SERVICE";
RestrictNamespaces = true;
RestrictRealtime = true;
RestrictSUIDSGID = true;