diff options
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/auth/openssh.nix | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/auth/openssh.nix b/sys/auth/openssh.nix index 3e37c06..ca32979 100644 --- a/sys/auth/openssh.nix +++ b/sys/auth/openssh.nix @@ -7,7 +7,7 @@ with lib; let port = if cfg.shiftPortNumber then 2234 else 22; restrict = cfg.restrictListen; - exemptList = config.services.fail2ban.ignoreIP; + exemptList = optionals config.local.net.fail2ban.enable config.services.fail2ban.ignoreIP; in { options.local.auth.openssh = { @@ -104,7 +104,7 @@ in ports = optional (restrict != null -> restrict.addresses != [ ]) port; startWhenNeeded = mkDefault (!config.services.fail2ban.enable); - extraConfig = '' + extraConfig = optionalString (exemptList != [ ]) '' PerSourcePenaltyExemptList ${concatStringsSep "," exemptList} '' + optionalString cfg.tunnel.enable '' # User 'tunnel' has no password. Use PAM OATH |
