nixos-config/modules/nixos/linux/server/harden/basics.nix
2024-09-28 18:01:53 -04:00

24 lines
472 B
Nix

{
# Firewall
networking.firewall.enable = true;
# Enable auditd
security.auditd.enable = true;
security.audit.enable = true;
# Standard openssh protections
#
# See primary-as-admin.nix to setup passwordless setup.
services = {
openssh = {
enable = true;
settings.PermitRootLogin = "no";
settings.PasswordAuthentication = false;
allowSFTP = false;
};
};
# 🤲
nix.settings.allowed-users = [ "root" "@users" ];
}