mirror of
https://github.com/tuxdotrs/nix-config.git
synced 2026-05-07 02:16:33 +05:30
feat: setup base
This commit is contained in:
29
modules/nixos/core/users.nix
Normal file
29
modules/nixos/core/users.nix
Normal file
@@ -0,0 +1,29 @@
|
||||
{
|
||||
flake.modules.nixos.core =
|
||||
{
|
||||
pkgs,
|
||||
userName,
|
||||
userEmail,
|
||||
...
|
||||
}:
|
||||
{
|
||||
programs.zsh.enable = true;
|
||||
|
||||
users = {
|
||||
mutableUsers = false;
|
||||
defaultUserShell = pkgs.zsh;
|
||||
users.${userName} = {
|
||||
initialPassword = userName;
|
||||
isNormalUser = true;
|
||||
extraGroups = [
|
||||
"networkmanager"
|
||||
"wheel"
|
||||
"storage"
|
||||
];
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIL+OzPUe2ECPC929DqpkM39tl/vdNAXfsRnmrGfR+X3D ${userEmail}"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user