Add users
Summary
You will create a user that can log in to machines.
Requirements
- A working Clan setup with at least one machine
Adding Users
clan.nix
{
inventory.machines = {
jon = { };
sara = { };
};
inventory.instances = {
jon-user = { # (1)
module.name = "users";
roles.default.tags.all = { }; # (2)
roles.default.settings = {
user = "jon"; # (3)
groups = [
"wheel" # Allow using 'sudo'
"networkmanager" # Allows to manage network connections.
"video" # Allows to access video devices.
"input" # Allows to access input devices.
];
};
};
};
}
What happens here:
- services/users: Implements logic for adding a single user.
The users service:
- creates a
/home/jondirectory. - allows
jonto sign in. - takes care of the user's password.
For more information see services/users
Checkpoint
To verify your user configuration is correct, run:
If the command completes without errors and prompts you to set a password for your user, the configuration is working correctly.
Up Next
In the next step, we will add a few recommended services to your Clan setup.