29 lines
741 B
Nix
29 lines
741 B
Nix
|
{ lib, config, ... }:
|
||
|
{
|
||
|
config.systemd.services = lib.mkIf (config.specialisation != { }) {
|
||
|
cups.serviceConfig = {
|
||
|
#CapabilityBoundingSet = [
|
||
|
# ""
|
||
|
#];
|
||
|
NoNewPrivileges = true;
|
||
|
RestrictNamespaces = "pid";
|
||
|
|
||
|
ProtectControlGroups = true;
|
||
|
ProtectKernelModules = true;
|
||
|
ProtectKernelTunables = true;
|
||
|
MemoryDenyWriteExecute = true;
|
||
|
RestrictSUIDSGID = true;
|
||
|
SystemCallArchitectures = "native";
|
||
|
SystemCallFilter = "@system-service";
|
||
|
LockPersonality = true;
|
||
|
ProtectHostname=true;
|
||
|
RestrictRealtime=true;
|
||
|
|
||
|
# PrivateUsers=true;
|
||
|
# PrivateNetwork=true;
|
||
|
# RestrictAddressFamilies="AF_UNIX";
|
||
|
# ProtectSystem=true;
|
||
|
};
|
||
|
};
|
||
|
}
|