- Create
/users/{{user}}.nixwith the following contents:
{config, lib, ...}:
{
users.users.{{user}} = {
isNormalUser = true;
description = "{{description}}";
extraGroups = [{{groups...}}];
openssh.authorizedKeys.keys = with import ../ssh-keys.nix; [{{keys...}}];
};
}- Import the
{{user}}.nixmodule in/machines/bastion.nixand other desired machines