User management: Difference between revisions
m Use nixos:options to be able to render <name> |
add user to group section |
||
(One intermediate revision by the same user not shown) | |||
Line 40: | Line 40: | ||
SSH authentication can be customized by setting the {{nixos:option|users.users.*.openssh.authorizedKeys|users.users.<name>.openssh.authorizedKeys}} option. | SSH authentication can be customized by setting the {{nixos:option|users.users.*.openssh.authorizedKeys|users.users.<name>.openssh.authorizedKeys}} option. | ||
== Adding User to a group == | |||
Users can be added to a group by setting the {{nixos:option|users.users.*.extraGroups|users.users.<name>.extraGroups}} option. For example: | |||
{{file|/etc/nixos/configuration.nix|nix| | |||
<nowiki> | |||
users.users.alice = { | |||
... | |||
extraGroups = [ "wheel" "networkmanager" ]; | |||
}; | |||
</nowiki> | |||
}} | |||
== Home Manager == | == Home Manager == | ||
For additional user environment configuration, including management of dotfiles, shell settings, and user-specific packages, consider using [[Home Manager]]. | For additional user environment configuration, including management of dotfiles, shell settings, and user-specific packages, consider using [[Home Manager]]. | ||
[[Category:Configuration]] | |||
[[Category:NixOS Manual]] |