diff options
author | Azat Bahawi <azat@bahawi.net> | 2024-03-31 21:29:27 +0300 |
---|---|---|
committer | Azat Bahawi <azat@bahawi.net> | 2024-03-31 21:29:27 +0300 |
commit | 9a5427e3a0c0ccf2a82dc503149a26b23fbd6004 (patch) | |
tree | f28beec29deeea36038615a8fb98a810891940b5 /modules/nixos/openssh.nix | |
parent | 2024-03-19 (diff) |
2024-03-31
Diffstat (limited to '')
-rw-r--r-- | modules/nixos/openssh.nix | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/modules/nixos/openssh.nix b/modules/nixos/openssh.nix index 4324e45..9b82757 100644 --- a/modules/nixos/openssh.nix +++ b/modules/nixos/openssh.nix @@ -1,11 +1,9 @@ -{ - config, - lib, - ... -}: -with lib; let +{ config, lib, ... }: +with lib; +let cfg = config.nixfiles.modules.openssh; -in { +in +{ options.nixfiles.modules.openssh.server = { enable = mkEnableOption "OpenSSH server"; @@ -29,15 +27,12 @@ in { services = { openssh = { enable = true; - ports = [cfg.server.port]; + ports = [ cfg.server.port ]; settings = { ClientAliveCountMax = 3; ClientAliveInterval = 60; KbdInteractiveAuthentication = false; - LogLevel = - if config.nixfiles.modules.fail2ban.enable - then "VERBOSE" - else "ERROR"; + LogLevel = if config.nixfiles.modules.fail2ban.enable then "VERBOSE" else "ERROR"; MaxAuthTries = 3; PasswordAuthentication = false; PermitRootLogin = mkForce "no"; |