{user, ...}: let sshKeys = [ # Main key "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMWVNUo+LRL86T4pv30/J31orpDVIMWCSgh/xvQHon8X openpgp:0xB6AB96F3" # Mobile key "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBL+j/gYSgLh7FQpAiUzWVIOCCAzZWRHez60p4n0OrGO0gU6tJoBQ6tD2vq8OTa8aj7j2Y++9CSguCn/3T9E6Qbk=" # Work key "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEIf4Ypws+1v9WL9MibW1dELpa/7YixElaBE7S71jsTy nrabulinski@antmicro.com" ]; in { services.openssh = { enable = true; settings = { PasswordAuthentication = false; KbdInteractiveAuthentication = false; GatewayPorts = "yes"; }; }; # TODO: Get all my SSH keys from centralized source users.users.root.openssh.authorizedKeys.keys = sshKeys; users.users.${user}.openssh.authorizedKeys.keys = sshKeys; }