dots/modules/services/ssh.nix

18 lines
333 B
Nix

{ config, lib, pkgs, ... }:
{
# Enable the OpenSSH daemon.
services.openssh = {
enable = true;
allowSFTP = true;
openFirewall = true;
settings = {
PermitRootLogin = "no";
PasswordAuthentication = false;
GatewayPorts = "no";
};
};
# enable fail2ban
services.fail2ban.enable = true;
}