nixos-config/modules/system/services/openssh.nix
2023-04-18 01:29:01 -04:00

17 lines
No EOL
460 B
Nix

{ config, pkgs, lib, ... }:
{
services.openssh = lib.mkDefault {
enable = true;
openFirewall = true;
passwordAuthentication = false;
permitRootLogin = "no";
kbdInteractiveAuthentication = false;
startWhenNeeded = true;
kexAlgorithms = [ "curve25519-sha256@libssh.org" ];
};
security.pam = lib.mkDefault {
enableSSHAgentAuth = true;
services.sudo.sshAgentAuth = true;
};
}