nixos/pgadmin: Apply hardening options

Signed-off-by: Felix Singer <felixsinger@posteo.net>
This commit is contained in:
Felix Singer
2025-09-07 23:48:56 +02:00
parent ecb4f79d82
commit 35693b3279

View File

@@ -228,6 +228,33 @@ in
"initial_password:${cfg.initialPasswordFile}" "initial_password:${cfg.initialPasswordFile}"
] ]
++ lib.optional cfg.emailServer.enable "email_password:${cfg.emailServer.passwordFile}"; ++ lib.optional cfg.emailServer.enable "email_password:${cfg.emailServer.passwordFile}";
AmbientCapabilities = "";
CapabilityBoundingSet = "";
LockPersonality = true;
MemoryDenyWriteExecute = true;
NoNewPrivileges = true;
PrivateDevices = true;
PrivateMounts = true;
PrivateTmp = true;
ProtectClock = true;
ProtectControlGroups = true;
ProtectHome = true;
ProtectHostname = true;
ProtectKernelLogs = true;
ProtectKernelModules = true;
ProtectKernelTunables = true;
ProtectSystem = "full";
RemoveIPC = true;
RestrictAddressFamilies = [
"AF_UNIX"
"AF_INET"
"AF_INET6"
];
RestrictNamespaces = true;
RestrictRealtime = true;
RestrictSUIDSGID = true;
SystemCallArchitectures = "native";
UMask = 27;
}; };
}; };