Files
cyper-nix/nixos/ssh.nix
2026-04-05 21:09:17 +02:00

15 lines
312 B
Nix

{ primaryUser, ... }:
{
services.openssh = {
enable = true;
openFirewall = true;
settings = {
PasswordAuthentication = false;
PermitRootLogin = "no";
};
};
users.users.${primaryUser}.openssh.authorizedKeys.keyFiles = [ ../secrets/ssh-key ];
programs.ssh.startAgent = true;
}