2026-05-28 11:30:05 +02:00
|
|
|
{
|
2026-08-01 20:29:56 +02:00
|
|
|
# Classic deny all
|
2026-05-28 11:30:05 +02:00
|
|
|
networking.nftables.enable = true;
|
|
|
|
|
networking.firewall = {
|
|
|
|
|
enable = true;
|
2026-08-01 20:29:56 +02:00
|
|
|
allowedTCPPorts = [ ];
|
|
|
|
|
allowedUDPPorts = [ ];
|
2026-05-28 11:30:05 +02:00
|
|
|
};
|
2026-08-01 20:29:56 +02:00
|
|
|
|
|
|
|
|
# No fork bomb
|
|
|
|
|
environment.etc."security/limits.conf".text = ''
|
|
|
|
|
* soft nproc 2000
|
|
|
|
|
* hard nproc 4000
|
|
|
|
|
'';
|
|
|
|
|
|
|
|
|
|
# Wheel group may edit the configuration.
|
|
|
|
|
systemd.tmpfiles.rules = [
|
2026-08-01 20:46:45 +02:00
|
|
|
"Z /etc/nixos ~4070 root wheel"
|
|
|
|
|
"A /etc/nixos - - - - d:u::rwx,d:g::-,d:g:wheel:rwx,d:mask:rwx"
|
2026-08-01 20:29:56 +02:00
|
|
|
];
|
2026-05-28 11:30:05 +02:00
|
|
|
}
|