From fb2f410e8952a8b9b9d768c01218aca1188dea38 Mon Sep 17 00:00:00 2001 From: Chris Toph Date: Fri, 17 Jan 2025 01:18:08 -0500 Subject: [PATCH] Set PermitRootLogin as a default value --- common/ssh/default.nix | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/common/ssh/default.nix b/common/ssh/default.nix index 1f5ea94..ae32c30 100644 --- a/common/ssh/default.nix +++ b/common/ssh/default.nix @@ -1,17 +1,21 @@ { - programs.ssh.startAgent = true; + lib, + ... +}: +{ + programs.ssh.startAgent = true; - users.users.root.openssh.authorizedKeys.keys = [ - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIClZstYoT64zHnGfE7LMYNiQPN5/gmCt382lC+Ji8lrH PVE" - ]; + users.users.root.openssh.authorizedKeys.keys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIClZstYoT64zHnGfE7LMYNiQPN5/gmCt382lC+Ji8lrH PVE" + ]; - services.openssh = { - enable = true; - settings = { - AllowUsers = null; # everyone - PasswordAuthentication = false; - KbdInteractiveAuthentication = false; - PermitRootLogin = "no"; - }; + services.openssh = { + enable = true; + settings = { + AllowUsers = null; # everyone + PasswordAuthentication = false; + KbdInteractiveAuthentication = false; + PermitRootLogin = lib.mkDefault "no"; }; -} \ No newline at end of file + }; +}