selfprivacy-nixos-config/users.nix

26 lines
580 B
Nix

{ pkgs, config, ... }:
let
cfg = config.services.userdata;
in
{
users.mutableUsers = false;
users = {
users = {
"${cfg.username}" = {
isNormalUser = true;
hashedPassword = cfg.hashedMasterPassword;
openssh.authorizedKeys.keys = cfg.sshKeys;
};
} // builtins.listToAttrs (builtins.map
(user: {
name = "${user.username}";
value = {
isNormalUser = true;
hashedPassword = user.hashedPassword;
openssh.authorizedKeys.keys = user.sshKeys;
};
})
cfg.users);
};
}