22 lines
469 B
Nix
22 lines
469 B
Nix
{ config, ... }:
|
|
let
|
|
primaryUser = config.system.primaryUser or "tb";
|
|
|
|
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
|
|
];
|
|
};
|
|
}
|