2023-11-07 23:47:14 +00:00
|
|
|
{lib, ...}:
|
|
|
|
with lib; let
|
2023-09-22 13:09:01 +00:00
|
|
|
admins = {
|
|
|
|
nerf = {
|
2023-11-07 23:47:14 +00:00
|
|
|
hashedPassword = "$y$j9T$SJcjUIcs3JYuM5oyxfEQa/$tUBQT07FK4cb9xm.A6ZKVnFIPNOYMOKC6Dt6hadCuJ7";
|
|
|
|
keys = [
|
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEdA4LpEGUUmN8esFyrNZXFb2GiBID9/S6zzhcnofQuP nerf@nerflap2"
|
|
|
|
];
|
2023-09-22 13:09:01 +00:00
|
|
|
};
|
2023-10-18 15:22:13 +00:00
|
|
|
gonne = {
|
2023-11-07 23:47:14 +00:00
|
|
|
hashedPassword = "$6$EtGpHEcFkOi0yUWp$slXf0CvIUrhdqaoCrQ5YwtYu2IVuE1RGGst4fnDPRLWVm.lYx0ruvSAF2/vw/sLbW37ORJjlb0NHQ.kSG7cVY/";
|
|
|
|
keys = [
|
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFopCUadohY3wg9AoEup9TDRDMyEPSLsQoCnN4lsKCrr gonne@mathebau.de NixOS"
|
|
|
|
];
|
2023-10-18 15:22:13 +00:00
|
|
|
};
|
2023-09-22 13:09:01 +00:00
|
|
|
};
|
|
|
|
|
2023-11-07 23:47:14 +00:00
|
|
|
mkAdmin = name: {
|
|
|
|
hashedPassword,
|
|
|
|
keys,
|
|
|
|
}: {
|
2023-09-22 13:09:01 +00:00
|
|
|
"${name}" = {
|
|
|
|
isNormalUser = true;
|
|
|
|
createHome = true;
|
2023-11-07 23:47:14 +00:00
|
|
|
extraGroups = ["wheel"];
|
2023-09-22 13:09:01 +00:00
|
|
|
group = "users";
|
|
|
|
home = "/home/${name}";
|
2023-11-07 23:47:14 +00:00
|
|
|
openssh.authorizedKeys = {inherit keys;};
|
2023-09-22 13:09:01 +00:00
|
|
|
inherit hashedPassword;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
in {
|
|
|
|
users.users = mkMerge (mapAttrsToList mkAdmin admins);
|
|
|
|
}
|