Skip to content

Commit ac3c573

Browse files
committed
Clean up systemd sandbox config
1 parent 76266b0 commit ac3c573

1 file changed

Lines changed: 7 additions & 13 deletions

File tree

flake.nix

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -164,23 +164,17 @@
164164
Group = cfg.group;
165165
WorkingDirectory = cfg.dataDir;
166166

167-
PrivateTmp = true;
167+
# Essential security.
168168
ProtectSystem = "strict";
169169
ProtectHome = true;
170170
ReadWritePaths = [ cfg.dataDir ];
171-
NoNewPrivileges = true;
172-
RestrictNamespaces = true;
173-
RestrictRealtime = true;
174-
RestrictSUIDSGID = true;
175-
LockPersonality = true;
176-
ProtectClock = true;
177-
ProtectHostname = true;
178-
ProtectKernelLogs = true;
179-
ProtectKernelModules = true;
180-
ProtectKernelTunables = true;
181-
ProtectControlGroups = true;
171+
172+
# Network restrictions.
182173
RestrictAddressFamilies = [ "AF_INET" "AF_INET6" ];
183-
SystemCallFilter = [ "@system-service" "~@privileged" ];
174+
175+
# Basic hardening.
176+
NoNewPrivileges = true;
177+
PrivateTmp = true;
184178
};
185179

186180
preStart = optionalString cfg.web.enable ''

0 commit comments

Comments
 (0)