flake/tests: improve multi arch support for flake checks
This commit is contained in:
parent
aec7c92cc7
commit
3c8d22a528
19
flake.nix
19
flake.nix
|
@ -62,20 +62,21 @@
|
||||||
defaultTemplate = self.templates.flk;
|
defaultTemplate = self.templates.flk;
|
||||||
|
|
||||||
deploy.nodes = os.mkNodes deploy self.nixosConfigurations;
|
deploy.nodes = os.mkNodes deploy self.nixosConfigurations;
|
||||||
|
|
||||||
checks =
|
|
||||||
let
|
|
||||||
tests = import ./tests { inherit self pkgs; };
|
|
||||||
deployChecks = builtins.mapAttrs
|
|
||||||
(system: deployLib: deployLib.deployChecks self.deploy)
|
|
||||||
deploy.lib;
|
|
||||||
in
|
|
||||||
nixos.lib.recursiveUpdate tests deployChecks;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
systemOutputs = utils.lib.eachDefaultSystem (system:
|
systemOutputs = utils.lib.eachDefaultSystem (system:
|
||||||
let pkgs = multiPkgs.${system}; in
|
let pkgs = multiPkgs.${system}; in
|
||||||
{
|
{
|
||||||
|
checks =
|
||||||
|
let
|
||||||
|
tests = nixos.lib.optionalAttrs (system == "x86_64-linux")
|
||||||
|
(import ./tests { inherit self pkgs; });
|
||||||
|
deployHosts = nixos.lib.filterAttrs
|
||||||
|
(n: _: self.nixosConfigurations.${n}.config.nixpkgs.system == system) self.deploy.nodes;
|
||||||
|
deployChecks = deploy.lib.${system}.deployChecks { nodes = deployHosts; };
|
||||||
|
in
|
||||||
|
nixos.lib.recursiveUpdate tests deployChecks;
|
||||||
|
|
||||||
packages = utils.lib.flattenTreeSystem system
|
packages = utils.lib.flattenTreeSystem system
|
||||||
(os.mkPackages { inherit pkgs; });
|
(os.mkPackages { inherit pkgs; });
|
||||||
|
|
||||||
|
|
|
@ -59,7 +59,6 @@ let
|
||||||
nixosTesting.makeTest calledTest;
|
nixosTesting.makeTest calledTest;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
x86_64-linux = {
|
|
||||||
profilesTest = mkTest {
|
profilesTest = mkTest {
|
||||||
name = "profiles";
|
name = "profiles";
|
||||||
|
|
||||||
|
@ -99,5 +98,5 @@ in
|
||||||
|
|
||||||
touch $out
|
touch $out
|
||||||
'';
|
'';
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue