17 lines
370 B
Nix
17 lines
370 B
Nix
{config, ...}: {
|
|
flake.modules.nixos.server = {
|
|
services.openssh = {
|
|
enable = true;
|
|
settings = {
|
|
PermitRootLogin = "prohibit-password";
|
|
PasswordAuthentication = false;
|
|
};
|
|
};
|
|
|
|
users.users.${config.flake.meta.user.name} = {
|
|
openssh.authorizedKeys.keys = [
|
|
config.flake.meta.user.ssh_key
|
|
];
|
|
};
|
|
};
|
|
}
|