blob: 8cbfc701c9cfa96b309e2973d6853b7e255fc734 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
{config, lib, ...}: let
cfg = config.homelab.core.ssh;
in {
options.homelab.core.ssh = {
enable = lib.mkEnableOption "ssh";
};
config = lib.mkIf cfg.enable {
services.openssh = {
enable = true;
ports = [ 22 2200 ];
settings = {
PermitRootLogin = "no";
PasswordAuthentication = false;
};
};
services.fail2ban.enable = true;
};
}
|