k3s: refactor passthru and expose k3s dependencies for update script

This commit is contained in:
superherointj
2024-07-12 17:58:00 -03:00
parent e72a3ac6b4
commit e4d5a9864a
@@ -417,16 +417,21 @@ buildGoModule rec {
runHook postInstallCheck
'';
passthru.updateScript = updateScript;
passthru.mkTests =
version:
let
k3s_version = "k3s_" + lib.replaceStrings [ "." ] [ "_" ] (lib.versions.majorMinor version);
in
lib.mapAttrs (name: value: nixosTests.k3s.${name}.${k3s_version}) nixosTests.k3s;
passthru.tests = passthru.mkTests k3sVersion;
passthru = {
k3sCNIPlugins = k3sCNIPlugins;
k3sContainerd = k3sContainerd;
k3sRepo = k3sRepo;
k3sRoot = k3sRoot;
k3sServer = k3sServer;
mkTests =
version:
let
k3s_version = "k3s_" + lib.replaceStrings [ "." ] [ "_" ] (lib.versions.majorMinor version);
in
lib.mapAttrs (name: value: nixosTests.k3s.${name}.${k3s_version}) nixosTests.k3s;
tests = passthru.mkTests k3sVersion;
updateScript = updateScript;
};
meta = baseMeta;
}