Files
nixy/server-modules/ssh.nix
Hadi 16c9d54a30 init server modules
Former-commit-id: 98cf8e99b0
2025-03-18 23:09:42 +01:00

17 lines
419 B
Nix

{ config, ... }: {
services.openssh = {
enable = true;
permitRootLogin = "no";
passwordAuthentication = false;
openFirewall = true;
ports = [ 22 ];
settings.AllowUsers = [ config.var.username ];
};
users.users."${config.var.username}" = {
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPG9SE80ZyBcXZK/f5ypSKudaM5Jo3XtQikCnGo0jI5E hadi@nixy"
];
};
}