Move sshd to server config. Neovim config.

This commit is contained in:
Fern Garden 2025-07-11 23:37:51 +08:00
parent e568306ec5
commit e4f3c24299
2 changed files with 52 additions and 120 deletions

View file

@ -10,6 +10,23 @@ with lib; {
# Enable all terminfo (for ghostty).
environment.enableAllTerminfo = true;
# Enable sshd.
services.openssh = {
enable = true;
settings = {
PermitRootLogin = "no";
PasswordAuthentication = false;
KbdInteractiveAuthentication = false;
};
};
users.users.${user}.openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIETPyuxUVEmYyEW6PVC6BXqkhULHd/RvMm8fMbYhjTMV fern@muskduck"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKzW4epTmK01kGVXcuAXUNJQPltnogf4uab9FA5m8S3n fern@pardalote"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBEJYq1fMxVOzCMfE/td6DtWS8nUk76U9seYD3Z9RYAz u0_a399@fairywren"
"sk-ssh-ed25519@openssh.com AAAAGnNrLXNzaC1lZDI1NTE5QG9wZW5zc2guY29tAAAAIMoJvPcUJDVVzO4dHROCFNlgJdDZSP5xyPx2s40zcx5QAAAABHNzaDo= YubiKey5NFC"
];
# Enable docker.
virtualisation.docker.enable = mkIf (user == "docker") true;
users.users.${user}.extraGroups = mkIf (user == "docker") ["docker"];