puter/common/users.nix

28 lines
616 B
Nix
Raw Normal View History

2024-12-01 03:05:16 +00:00
{
config,
lib,
...
}: let
inherit (config.users) mainUser;
in {
age.secrets = lib.mkSecrets {"user-${mainUser}" = {};};
2024-02-04 20:51:11 +00:00
users = {
2024-08-18 12:54:44 +00:00
mutableUsers = false;
2024-02-04 20:51:11 +00:00
users = {
2024-09-15 16:07:59 +00:00
root = {
hashedPassword = "!";
openssh.authorizedKeys.keys = builtins.attrValues (import ../pubkeys.nix).hosts;
};
2024-12-01 03:05:16 +00:00
${mainUser} = {
2024-07-01 22:06:05 +00:00
uid = 1000;
2024-02-04 20:51:11 +00:00
isNormalUser = true;
2024-12-01 03:05:16 +00:00
hashedPasswordFile = config.age.secrets."user-${mainUser}".path;
2024-04-13 20:29:14 +00:00
openssh.authorizedKeys.keys = builtins.attrValues (import ../pubkeys.nix).users;
2024-09-15 12:17:08 +00:00
extraGroups = ["wheel"];
2024-02-04 20:51:11 +00:00
};
};
};
}