nixos/modules/base/ssh.nix

19 lines
367 B
Nix
Raw Normal View History

2023-08-01 15:35:09 +02:00
{ ... }: {
services.openssh = {
enable = true;
ports = [ 222 ];
settings = {
PasswordAuthentication = false;
};
};
environment.persistence."/nix/persist" = {
2023-08-01 16:55:53 +02:00
files = [
"/etc/ssh/ssh_host_ed25519_key"
"/etc/ssh/ssh_host_ed25519_key.pub"
"/etc/ssh/ssh_host_rsa_key"
"/etc/ssh/ssh_host_rsa_key.pub"
];
2023-08-01 15:35:09 +02:00
};
}