nixos/k3s: get tests working again

Some of the attributes fetched throw, so tryEval them. Recurse into the
attribute set to pick up all the tests.

(cherry picked from commit 727809f534)
This commit is contained in:
Morgan Jones
2025-05-16 21:31:51 -07:00
committed by github-actions[bot]
parent 3e1e848be4
commit c239eca2d9

View File

@@ -4,9 +4,11 @@
lib ? pkgs.lib,
}:
let
allK3s = lib.filterAttrs (n: _: lib.strings.hasPrefix "k3s_" n) pkgs;
allK3s = lib.filterAttrs (
n: _: lib.strings.hasPrefix "k3s_" n && (builtins.tryEval pkgs.${n}).success
) pkgs;
in
{
lib.recurseIntoAttrs {
airgap-images = lib.mapAttrs (
_: k3s: import ./airgap-images.nix { inherit system pkgs k3s; }
) allK3s;