Rename machine folders, clean up flake

This commit is contained in:
Ilya K 2024-07-10 15:24:47 +03:00
parent 787b3af638
commit a9f45daac8
5 changed files with 22 additions and 68 deletions

View file

@ -69,7 +69,22 @@
nixosConfigurations = (colmena.lib.makeHive self.outputs.colmena).nodes;
colmena = {
colmena = let
commonModules = [
inputs.agenix.nixosModules.default
inputs.hydra.nixosModules.hydra
./services
./common
];
makeBuilder = i: lib.nameValuePair "builder-${toString i}" {
imports = commonModules;
bagel.baremetal.builders = { enable = true; num = i; };
};
builders = lib.listToAttrs (lib.genList makeBuilder 12);
in {
meta.nixpkgs = import nixpkgs {
localSystem = system;
overlays = [
@ -80,72 +95,11 @@
};
meta.specialArgs.inputs = inputs;
bagel-box = {
imports = [
inputs.agenix.nixosModules.default
inputs.hydra.nixosModules.hydra
./services
./common
./hosts/bagel-box
];
};
meta01 = {
imports = [
inputs.agenix.nixosModules.default
inputs.hydra.nixosModules.hydra
./services
./common
./hosts/meta01.nixpkgs.lahfa.xyz
];
};
gerrit01 = {
imports = [
inputs.agenix.nixosModules.default
inputs.hydra.nixosModules.hydra
./services
./common
./hosts/cl.forkos.org
];
};
fodwatch = {
imports = [
inputs.agenix.nixosModules.default
inputs.hydra.nixosModules.hydra
./services
./common
./hosts/fodwatch.forkos.org
];
};
wob-vpn-gw = {
imports = [
inputs.agenix.nixosModules.default
inputs.hydra.nixosModules.hydra
./services
./common
./hosts/wob-vpn-gw.forkos.org
];
};
} // (lib.listToAttrs (lib.genList (i: lib.nameValuePair "builder-${toString i}" {
imports = [
inputs.agenix.nixosModules.default
inputs.hydra.nixosModules.hydra
./services
./common
{
bagel.baremetal.builders = { enable = true; num = i; };
}
];
}) 12));
bagel-box.imports = commonModules ++ [ ./hosts/bagel-box ];
meta01.imports = commonModules ++ [ ./hosts/meta01 ];
gerrit01.imports = commonModules ++ [ ./hosts/gerrit01 ];
fodwatch.imports = commonModules ++ [ ./hosts/fodwatch ];
wob-vpn-gw.imports = commonModules ++ [ ./hosts/wob-vpn-gw ];
} // builders;
};
}