shared-public-infra/modules/users/admins.nix
2023-09-11 19:56:06 +02:00

72 lines
2.1 KiB
Nix

{ config
, lib
, ...
}:
let
extraGroups = [ "wheel" "docker" "plugdev" "vboxusers" "adbusers" "input" ];
in
{
config = {
users.users = {
# Ryan Lahfa
raito = {
isNormalUser = true;
home = "/home/raito";
inherit extraGroups;
shell = "/run/current-system/sw/bin/zsh";
uid = 1000;
openssh.authorizedKeys.keyFiles = [ ./keys/raito.keys ];
};
# Julien Malka
luj = {
isNormalUser = true;
home = "/home/luj";
inherit (config.users.users.raito);
extraGroups = extraGroups ++ [ "production-hydra-db" ];
shell = "/run/current-system/sw/bin/zsh";
uid = 1001;
openssh.authorizedKeys.keyFiles = [ ./keys/luj.keys ];
};
# Gabriel Doriath Döhler
gdd = {
isNormalUser = true;
home = "/home/gdd";
inherit (config.users.users.raito) extraGroups;
shell = "/run/current-system/sw/bin/zsh";
uid = 1002;
openssh.authorizedKeys.keyFiles = [ ./keys/gdd.keys ];
};
# Samy Lahfa
akechi = {
isNormalUser = true;
home = "/home/akechi";
inherit (config.users.users.raito) extraGroups;
shell = "/run/current-system/sw/bin/zsh";
uid = 1003;
openssh.authorizedKeys.keyFiles = [ ./keys/akechi.keys ];
};
# Tom Hubrecht
tomate = {
isNormalUser = true;
home = "/home/tomate";
inherit (config.users.users.raito) extraGroups;
shell = "/run/current-system/sw/bin/zsh";
uid = 1004;
openssh.authorizedKeys.keyFiles = [ ./keys/tomate.keys ];
};
root = {
hashedPassword = "$y$j9T$LiCWsEVrg9FlcEwuDGsol.$ghfkPkQGoAt23hI6.vWNLrSdHDnVwxg8EE/2w2pRbT6";
# passwordFile = lib.mkIf config.users.withSops config.sops.secrets.root-password-hash.path;
openssh.authorizedKeys.keyFiles = lib.concatMap (user: config.users.users.${user}.openssh.authorizedKeys.keyFiles) [ "raito" "luj" "gdd" "akechi" "tomate" ];
};
};
nix.settings.trusted-users = [ "raito" "luj" "gdd" "akechi" "tomate" ];
};
}