From 9496f06b87fc294dcdde390fb8cfa0d08f346d51 Mon Sep 17 00:00:00 2001 From: arouzing Date: Thu, 2 Feb 2023 18:18:00 -0500 Subject: [PATCH] mighrate with lib to narrow scope --- .modules/services/openssh.nix | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.modules/services/openssh.nix b/.modules/services/openssh.nix index 37a0252..1d38250 100644 --- a/.modules/services/openssh.nix +++ b/.modules/services/openssh.nix @@ -1,16 +1,18 @@ -_: { config, pkgs, lib, ... }: +{ config, pkgs, lib, ... }: { - services.openssh = { + services.openssh = lib.mkDefault { enable = true; openFirewall = true; + settings = lib.mkDefault { + passwordAuthentication = false; + permitRootLogin = "no"; + kbdInteractiveAuthentication = false; + }; startWhenNeeded = true; kexAlgorithms = [ "curve25519-sha256@libssh.org" ]; - passwordAuthentication = false; - kbdInteractiveAuthentication = false; - permitRootLogin = "no"; }; - security.pam = mkDefault{ + security.pam = lib.mkDefault { enableSSHAgentAuth = true; services.sudo.sshAgentAuth = true; };