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

20 lines
354 B
Nix
Raw Normal View History

2024-08-08 09:02:42 +08:00
{...}: {
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
};
2024-08-08 09:02:42 +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
}