Files
cyper-nix/nixos/ssh.nix
T
2026-05-03 23:20:40 +02:00

18 lines
387 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;
security.doas = {
enable = true;
wheelNeedsPassword = false;
};
}