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:
parent
081d1fa6e1
commit
5824942904
17 changed files with 171 additions and 54 deletions
31
modules/security.nix
Normal file
31
modules/security.nix
Normal 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"
|
||||
];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue