feat: add @localboot tags for machine which can be deployed

colmena does not support netboot deployment, this is fine. We can fix it
later.

Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
This commit is contained in:
raito 2024-10-05 16:29:14 +02:00 committed by raito
parent a2eecd1886
commit c0689e6832

View file

@ -113,18 +113,27 @@
./services
./common
{
({ config, lib, ... }: {
# This means that anyone with @floral-infra permissions
# can ssh on root of every machines handled here.
bagel.admins.allowedGroups = [
"floral-infra"
];
}
# Tag all machines which have local boot as local bootables.
deployment.tags = lib.mkIf (config.bagel.baremetal.builders.enable -> !config.bagel.baremetal.builders.netboot)
[ "localboot" ];
})
];
makeBuilder = i: lib.nameValuePair "builder-${toString i}" {
makeBuilder = i:
let
enableNetboot = i >= 6;
in
lib.nameValuePair "builder-${toString i}" {
imports = commonModules;
bagel.baremetal.builders = { enable = true; num = i; netboot = i >= 6; };
bagel.baremetal.builders = { enable = true; num = i; netboot = enableNetboot; };
};
builders = lib.listToAttrs (lib.genList makeBuilder 11);