From 5d23c751f3b2f4ae1c79aa2bd569f61f7e58fa66 Mon Sep 17 00:00:00 2001 From: Gabriel Arazas Date: Sun, 29 Jan 2023 12:03:44 +0800 Subject: [PATCH] profiles/server: convert part of OpenSSH config to settings attribute --- modules/nixos/profiles/server.nix | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/modules/nixos/profiles/server.nix b/modules/nixos/profiles/server.nix index b226e9c5..6c82167d 100644 --- a/modules/nixos/profiles/server.nix +++ b/modules/nixos/profiles/server.nix @@ -31,12 +31,14 @@ in services.openssh = lib.mkDefault { enable = true; - # Both are good for hardening as it only requires the keyfiles. - passwordAuthentication = false; - permitRootLogin = "no"; + settings = { + # Making it verbose for services such as fail2ban. + LogLevel = "VERBOSE"; - # Making it verbose for services such as fail2ban. - logLevel = "VERBOSE"; + # Both are good for hardening as it only requires the keyfiles. + PasswordAuthentication = "no"; + PermitRootLogin = "no"; + }; }; # Manage your servers like a Linux-using basement dweller with their