diff options
Diffstat (limited to 'users.nix')
| -rw-r--r-- | users.nix | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/users.nix b/users.nix new file mode 100644 index 0000000..7902ca4 --- /dev/null +++ b/users.nix @@ -0,0 +1,39 @@ +{ + config, + lib, + machine, + ... +}: let + machines = import ./machines.nix; +in { + users.users = + builtins.mapAttrs + (name: value: lib.mkIf (builtins.elem name machine.users) value) + { + "andromeda" = { + isNormalUser = true; + description = "andromeda"; + hashedPasswordFile = builtins.toString config.age.secrets.secret0.path; + extraGroups = [ + "networkmanager" + "wheel" + ]; + }; + "mtgmonkey" = { + isNormalUser = true; + description = "mtgmonkey"; + hashedPasswordFile = builtins.toString config.age.secrets.secret1.path; + extraGroups = [ + (lib.mkIf + (machine == machines.lenovo) + "networkmanager") + "wheel" + ]; + openssh.authorizedKeys.keys = [ + (lib.mkIf + (machine == machines._173-249-5-230) + config.pub-keys.ssh.andromeda) + ]; + }; + }; +} |
