refactor: split code into modules

This commit is contained in:
tux
2025-02-22 11:11:59 +05:30
parent 65649c30cc
commit 29bd3485ca
8 changed files with 103 additions and 66 deletions

20
modules/base/user.nix Normal file
View File

@ -0,0 +1,20 @@
{
config,
pkgs,
username,
email,
...
}: {
users = {
mutableUsers = false;
defaultUserShell = pkgs.zsh;
users.${username} = {
hashedPasswordFile = config.sops.secrets.tux-password.path;
isNormalUser = true;
extraGroups = ["networkmanager" "wheel" "storage"];
openssh.authorizedKeys.keys = [
''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIL+OzPUe2ECPC929DqpkM39tl/vdNAXfsRnmrGfR+X3D ${email}''
];
};
};
}