puter/common/users.nix

30 lines
631 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-12-30 21:52:20 +00:00
mainUser = "lukas";
2024-02-04 20:51:11 +00:00
users = {
2024-09-15 16:07:59 +00:00
root = {
hashedPassword = "!";
2024-12-30 21:52:20 +00:00
openssh.authorizedKeys.keys = builtins.attrValues config.pubkeys.hosts;
2024-09-15 16:07:59 +00:00
};
2024-12-01 03:05:16 +00:00
${mainUser} = {
2024-12-01 04:03:34 +00:00
description = "Lukas Wurzinger";
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-12-30 21:52:20 +00:00
openssh.authorizedKeys.keys = builtins.attrValues config.pubkeys.users;
2024-02-04 20:51:11 +00:00
};
};
};
}