infra/modules/darwin/builder.nix

23 lines
611 B
Nix
Raw Normal View History

2023-05-16 18:58:13 +10:00
{
users.knownUsers = [ "nix" ];
users.users.nix = {
name = "nix";
uid = 8765;
home = "/Users/nix";
createHome = true;
shell = "/bin/zsh";
2023-07-31 08:34:31 +10:00
# if user is removed the keys need to be removed manually from /etc/ssh/authorized_keys.d
2023-05-16 18:58:13 +10:00
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEmdo1x1QkRepZf7nSe+OdEWX+wOjkBLF70vX9F+xf68 builder"
];
};
# add build user to group for ssh access
system.activationScripts.postActivation.text = ''
dseditgroup -o edit -a "nix" -t user com.apple.access_ssh
'';
2023-05-16 18:58:13 +10:00
nix.settings.trusted-users = [ "nix" ];
}