mirror of
https://github.com/gburd/nix-config.git
synced 2024-09-09 11:26:12 +00:00
22 lines
451 B
Nix
22 lines
451 B
Nix
{ lib, ... }: {
|
|
services = {
|
|
openssh = {
|
|
enable = true;
|
|
settings = {
|
|
PasswordAuthentication = false;
|
|
PermitRootLogin = lib.mkDefault "no";
|
|
};
|
|
};
|
|
sshguard = {
|
|
enable = true;
|
|
whitelist = [
|
|
"192.168.2.0/24"
|
|
"192.168.192.0/24"
|
|
"62.31.16.154"
|
|
"80.209.186.67"
|
|
];
|
|
};
|
|
};
|
|
programs.ssh.startAgent = true;
|
|
networking.firewall.allowedTCPPorts = [ 22 ];
|
|
}
|