Initial commit

This commit is contained in:
Aleksandr 2024-12-17 00:22:23 +03:00
commit 1518f7007b
39 changed files with 1779 additions and 0 deletions

7
m/masters/default.nix Normal file
View file

@ -0,0 +1,7 @@
{
imports = [
./nero.nix
];
users.mutableUsers = false;
}

37
m/masters/nero.nix Normal file
View file

@ -0,0 +1,37 @@
{ lib, pkgs, config, ... }:
let
types = lib.types;
masters = config.maid.masters;
hm = config.maid.hm;
mkUser = name: {
enable = lib.mkEnableOption name;
override = lib.mkOption {
type = types.attrs;
default = {};
};
};
in
{
options.maid.masters = {
nero = mkUser "nero";
};
config = lib.mkIf masters.nero.enable {
sops.secrets."users/nero/passwordHash" = {
neededForUsers = true;
sopsFile = ../../secrets/users.yaml;
};
users.users.nero = {
isNormalUser = true;
uid = 1000;
hashedPasswordFile = config.sops.secrets."users/nero/passwordHash".path;
extraGroups = [ "networkmanager" "docker" "wheel" "adbuser" ];
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBaWnT7mpLERhm3zIWglNy094a7F7d7cpEImLZYwwWoS nero@lil-maid"
];
} // masters.nero.override;
};
}