1
0
Fork 0
puter/common/users.nix

30 lines
599 B
Nix
Raw Normal View History

2024-12-01 04:05:16 +01:00
{
2025-05-18 01:08:10 +02:00
self,
2024-12-01 04:05:16 +01:00
config,
...
2025-05-11 22:49:04 +02:00
}:
let
2024-12-01 04:05:16 +01:00
inherit (config.users) mainUser;
2025-05-11 22:49:04 +02:00
in
{
2025-05-18 01:08:10 +02:00
age.secrets."user-${mainUser}".file = self + /secrets/users/${mainUser}.age;
2024-02-04 21:51:11 +01:00
users = {
2024-08-18 14:54:44 +02:00
mutableUsers = false;
2025-04-01 19:12:52 +00:00
mainUser = "helvetica";
2024-12-30 22:52:20 +01:00
2024-02-04 21:51:11 +01:00
users = {
2025-03-09 17:03:39 +01:00
root.hashedPassword = "!";
2024-12-01 04:05:16 +01:00
${mainUser} = {
2025-04-01 19:12:52 +00:00
description = "Helvetica";
2024-07-02 00:06:05 +02:00
uid = 1000;
2024-02-04 21:51:11 +01:00
isNormalUser = true;
2024-12-01 04:05:16 +01:00
hashedPasswordFile = config.age.secrets."user-${mainUser}".path;
2024-12-30 22:52:20 +01:00
openssh.authorizedKeys.keys = builtins.attrValues config.pubkeys.users;
2025-05-11 22:49:04 +02:00
extraGroups = [ "wheel" ]; # TODO remove
2024-02-04 21:51:11 +01:00
};
};
};
}