1
0
Files
nix-shared/system/default/ssh-authorized-keys.nix

22 lines
469 B
Nix
Raw Normal View History

{ config, ... }:
let
primaryUser = config.system.primaryUser or "tb";
2026-02-17 09:32:28 -08:00
ssh_key_tb1 = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBW//dhztkY2OJTXK/1tpOdithfSX4tXt3w5CKPJPfFm tb1@ubi";
in
{
# Allow root login with `tb1` ssh key.
users.users.root = {
openssh.authorizedKeys.keys = [
ssh_key_tb1
];
};
# Allow primary user login with `tb1` ssh key.
users.users."${primaryUser}" = {
openssh.authorizedKeys.keys = [
ssh_key_tb1
];
};
}