From c0689e6832bca54533dc98e39d0347c4625b8306 Mon Sep 17 00:00:00 2001 From: Raito Bezarius Date: Sat, 5 Oct 2024 16:29:14 +0200 Subject: [PATCH] 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 --- flake.nix | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/flake.nix b/flake.nix index 80b33c9..a0d0564 100644 --- a/flake.nix +++ b/flake.nix @@ -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);