nerf/defaultRoles #12

Merged
nerf merged 10 commits from nerf/nixConfig:nerf/defaultRoles into main 2023-10-05 21:15:32 +00:00
Showing only changes of commit d7b8d63f83 - Show all commits

30
nixos/roles/admins.nix Normal file
View file

@ -0,0 +1,30 @@
{lib, ...} :
with lib;
let
admins = {
nerf = {
hashedPassword =
"$6$rounds=424242$FaEtIXMUScxgAYyF$Fl8GbPFgiEv.1iwrhtVpTixG1BTJys3aIfLyTzocQYZV4JymrYEXtnyCTURmVDe8stxbxgDutmtlyElfn1DQc/";
Gonne marked this conversation as resolved
Review

Why does this user get a password? We didn't do that on our Debian machines with individual user accounts.

Why does this user get a password? We didn't do that on our Debian machines with individual user accounts.
Review

Basically my paranoia, makes privilege escalation on that machine harder.

It also makes sane user based console log ins possible. You might have noticed I disabled root
console (technically password) login.

Basically my paranoia, makes privilege escalation on that machine harder. It also makes sane user based console log ins possible. You might have noticed I disabled root console (technically password) login.
keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEdA4LpEGUUmN8esFyrNZXFb2GiBID9/S6zzhcnofQuP nerf@nerflap2"
];
};
};
mkAdmin = name :
{hashedPassword, keys}: {
"${name}" = {
isNormalUser = true;
createHome = true;
Gonne marked this conversation as resolved
Review

Why do they get a home directory? I would expect them to have about no personal data.

Why do they get a home directory? I would expect them to have about no personal data.
Review

The home directory is not persistent anyway, but it will give a lot of programs that you might use a safe to throw their stuff.
For example bash starts to write things to disk the moment you use it. All in all I think it is convenient and not persistent anyway.
But I also don't think it matters too much. So I can change it if you think that is blocking

The home directory is not persistent anyway, but it will give a lot of programs that you might use a safe to throw their stuff. For example bash starts to write things to disk the moment you use it. All in all I think it is convenient and not persistent anyway. But I also don't think it matters too much. So I can change it if you think that is blocking
Review

I don't really care.

I don't really care.
extraGroups = [ "wheel" ];
group = "users";
home = "/home/${name}";
openssh.authorizedKeys = { inherit keys; };
inherit hashedPassword;
};
};
in {
users.users = mkMerge (mapAttrsToList mkAdmin admins);
}