custom certificates + ssl module to deploy it. headscale module using self-signed certificate. sops-nix secrets to deploy certificate keys. random file are also sorted.

This commit is contained in:
boyreau 2026-08-08 19:30:07 +02:00
commit 5824942904
17 changed files with 171 additions and 54 deletions

31
modules/security.nix Normal file
View file

@ -0,0 +1,31 @@
{
# Classic deny all
networking.nftables.enable = true;
networking.firewall = {
enable = true;
allowedTCPPorts = [ ];
allowedUDPPorts = [ ];
};
networking = {
nameservers = [
"45.90.28.0"
"2a07:a8c0::"
"45.90.30.0"
"2a07:a8c1::"
];
networkmanager.dns = "none";
};
# No fork bomb
environment.etc."security/limits.conf".text = ''
* soft nproc 2000
* hard nproc 4000
'';
# Wheel group may edit the configuration.
systemd.tmpfiles.rules = [
"Z /etc/nixos ~6070 root wheel"
"A /etc/nixos - - - - d:u::rwx,d:g::-,d:g:wheel:rwx,d:mask:rwx"
];
}