dotfiles.nix/nixos/common/global/ssh.nix
2024-08-08 09:02:42 +08:00

20 lines
354 B
Nix

{...}: {
services.openssh = {
enable = true;
settings = {
PermitRootLogin = "no";
PasswordAuthentication = false;
LogLevel = "VERBOSE";
};
ports = [22];
openFirewall = true;
};
services.rsyslogd = {
enable = true;
extraConfig = ''
if $programname == 'sshd' then /var/log/sshd.log
'';
};
}