grimm-nixos-laptop/hardening/systemd/cups.nix
2025-01-05 23:03:11 +01:00

28 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;
};
};
}