mirror of
https://github.com/srid/nixos-config.git
synced 2026-01-05 07:04:56 +08:00
24 lines
561 B
Nix
24 lines
561 B
Nix
{ pkgs, ... }: {
|
|
|
|
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.187.43"
|
|
];
|
|
};
|
|
};
|
|
nix.allowedUsers = [ "root" "srid" ];
|
|
nix.trustedUsers = [ "root" "srid" ];
|
|
}
|