Unverified Commit c7968cf1 authored by isabel's avatar isabel
Browse files

nixos/wakapi: harden systemd service

when using `systemd-analyze security wakapi.service` we went from a 5.9
to a 3.
parent 2b4960c7
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -159,18 +159,25 @@ in
        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 = "strict";
        ProtectSystem = "full";
        RestrictAddressFamilies = [
          "AF_INET"
          "AF_INET6"
          "AF_UNIX"
        ];
        CapabilityBoundingSet = "CAP_NET_BIND_SERVICE";
        RestrictNamespaces = true;
        RestrictRealtime = true;
        RestrictSUIDSGID = true;