puter/common/users.nix
2024-12-01 05:03:34 +01:00

29 lines
657 B
Nix

{
config,
lib,
...
}: let
inherit (config.users) mainUser;
in {
age.secrets = lib.mkSecrets {"user-${mainUser}" = {};};
users = {
mutableUsers = false;
users = {
root = {
hashedPassword = "!";
openssh.authorizedKeys.keys = builtins.attrValues (import ../pubkeys.nix).hosts;
};
${mainUser} = {
description = "Lukas Wurzinger";
uid = 1000;
isNormalUser = true;
hashedPasswordFile = config.age.secrets."user-${mainUser}".path;
openssh.authorizedKeys.keys = builtins.attrValues (import ../pubkeys.nix).users;
extraGroups = ["wheel"];
};
};
};
}