mirror of
https://github.com/srid/nixos-config.git
synced 2025-12-28 08:14:58 +08:00
28 lines
597 B
Nix
28 lines
597 B
Nix
{ pkgs, ... }: {
|
|
|
|
# Firewall
|
|
networking.firewall.enable = true;
|
|
|
|
security.sudo.execWheelOnly = true;
|
|
|
|
security.auditd.enable = true;
|
|
security.audit.enable = true;
|
|
|
|
services = {
|
|
openssh = {
|
|
enable = true;
|
|
permitRootLogin = "prohibit-password"; # distributed-build.nix requires it
|
|
passwordAuthentication = false;
|
|
allowSFTP = false;
|
|
};
|
|
fail2ban = {
|
|
enable = true;
|
|
ignoreIP = [
|
|
# quebec
|
|
"70.53.237.50"
|
|
];
|
|
};
|
|
};
|
|
nix.settings.allowed-users = [ "root" "srid" ];
|
|
nix.settings.trusted-users = [ "root" "srid" ];
|
|
}
|