diff --git a/lib/user.nix b/lib/user.nix index f58f310..a54dc3a 100644 --- a/lib/user.nix +++ b/lib/user.nix @@ -7,7 +7,7 @@ groups, uid, shell, - sshKeys, + sshKeys ? [ ], ... }: { diff --git a/modules/system/sshd/default.nix b/modules/system/sshd/default.nix index 0ac0f57..68abf10 100644 --- a/modules/system/sshd/default.nix +++ b/modules/system/sshd/default.nix @@ -8,7 +8,8 @@ with lib; let cfg = config.olduser101.sshd; -in { +in +{ options.olduser101.sshd = { enable = mkOption { type = types.bool; @@ -24,17 +25,17 @@ in { }; config = mkIf cfg.enable { - services.openssh = { - enable = true; - openFirewall = true; - settings = { - PasswordAuthentication = false; - KbdInteractiveAuthentication = false; - PermitRootLogin = "no"; - MaxAuthTries = 3; - AllowUsers = cfg.users; - PerSourcePenalties = "crash:3600s authfail:3600s max:86400s"; - }; - }; + services.openssh = { + enable = true; + openFirewall = true; + settings = { + PasswordAuthentication = false; + KbdInteractiveAuthentication = false; + PermitRootLogin = "no"; + MaxAuthTries = 3; + AllowUsers = cfg.users; + PerSourcePenalties = "crash:3600s authfail:3600s max:86400s"; + }; + }; }; }