mirror of
https://github.com/anotherhadi/nixy.git
synced 2026-04-02 11:12:09 +02:00
16
server-modules/ssh.nix
Normal file
16
server-modules/ssh.nix
Normal file
@@ -0,0 +1,16 @@
|
||||
{ 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"
|
||||
];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user