Generate colmena and hydraJobs outputs from the same hosts attribute set

This commit is contained in:
fi 2023-07-31 15:03:52 +02:00
parent 5856edeb47
commit 59a7e36838
Signed by: fi
SSH key fingerprint: SHA256:d+6fQoDPMbSFK95zRVflRKZLRKF4cPSQb7VIxYkhFsA
3 changed files with 15 additions and 6 deletions

View file

@ -19,8 +19,13 @@
system,
modules,
...
}:
(nixpkgs.lib.filterAttrs (name: host: (builtins.substring 0 1 name) != "_") (hostNixpkgs.lib.nixosSystem {
inherit system modules;
})).config.system.build.toplevel;
}:
let
# Filter attritubes starting with _ to avoid infinite recursion when building with hydra
# TODO: Why does this happen?
filter = name: host: (builtins.substring 0 1 name) != "_";
in
(nixpkgs.lib.filterAttrs filter (hostNixpkgs.lib.nixosSystem {
inherit system modules;
})).config.system.build.toplevel; # Builds the entire NixOS system, see: https://nixos.org/manual/nixos/stable/#sec-building-parts
}