2021-11-15 10:02:05 +00:00
|
|
|
{ pkgs, config, ... }:
|
2021-11-15 10:29:20 +00:00
|
|
|
let
|
|
|
|
cfg = config.services.userdata;
|
|
|
|
in
|
2021-11-15 10:02:05 +00:00
|
|
|
{
|
|
|
|
users.mutableUsers = false;
|
|
|
|
users = {
|
|
|
|
users = {
|
2021-11-15 10:29:20 +00:00
|
|
|
"${cfg.username}" = {
|
2021-11-15 10:02:05 +00:00
|
|
|
isNormalUser = true;
|
2021-11-15 10:29:20 +00:00
|
|
|
hashedPassword = cfg.hashedMasterPassword;
|
2021-11-15 10:02:05 +00:00
|
|
|
};
|
2021-11-15 10:29:20 +00:00
|
|
|
} // builtins.listToAttrs (builtins.map
|
|
|
|
(user: {
|
|
|
|
name = "${user.username}";
|
|
|
|
value = {
|
|
|
|
isNormalUser = true;
|
|
|
|
hashedPassword = user.hashedPassword;
|
|
|
|
};
|
|
|
|
})
|
|
|
|
cfg.users);
|
2021-11-15 10:02:05 +00:00
|
|
|
};
|
|
|
|
}
|