nixos/pgadmin: Apply hardening options

Signed-off-by: Felix Singer <felixsinger@posteo.net>

Changed files
+27
nixos
modules
services
admin
+27
nixos/modules/services/admin/pgadmin.nix
···
"initial_password:${cfg.initialPasswordFile}"
]
++ 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;
};
};