nixos-configs/modules/sshd.nix
matt1432 8a8ea40101
All checks were successful
Discord / discord commits (push) Has been skipped
refactor(openssh): move authorizedKeys to sshd module
2024-01-16 22:33:02 -05:00

21 lines
599 B
Nix

{config, ...}: let
inherit (config.vars) mainUser;
in {
services = {
openssh = {
enable = true;
settings = {
PasswordAuthentication = false;
PermitRootLogin = "no";
};
};
};
users.users.${mainUser} = {
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPE39uk52+NIDLdHeoSHIEsOUUFRzj06AGn09z4TUOYm matt@OP9"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICr2+CpqXNMLsjgbrYyIwTKhlVSiIYol1ghBPzLmUpKl matt@binto"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJGbLu+Gb7PiyNgNXMHemaQLnKixebx1/4cdJGna9OQp matt@wim"
];
};
}