dotfiles.nix/nixos/common/global/ssh.nix

22 lines
359 B
Nix
Raw Normal View History

2024-01-14 06:29:18 +08:00
{ ... }:
{
services.openssh = {
enable = true;
settings = {
PermitRootLogin = "no";
PasswordAuthentication = false;
LogLevel = "VERBOSE";
2024-01-14 06:29:18 +08:00
};
ports = [ 22 ];
2024-01-14 06:29:18 +08:00
openFirewall = true;
};
services.rsyslogd = {
enable = true;
extraConfig = ''
if $programname == 'sshd' then /var/log/sshd.log
'';
};
2024-01-14 06:29:18 +08:00
}