Make checks a build step

This commit is contained in:
Greg Hellings
2025-12-10 07:02:12 -06:00
parent 89bd14eacf
commit 06d745e572
+14 -3
View File
@@ -2,6 +2,7 @@
lib,
system,
top,
writeShellApplication,
...
}:
@@ -9,8 +10,18 @@ let
meta = import ./hosts/metadata.nix;
in
# Pulls all hosts down to be a check
(builtins.mapAttrs (_n: v: v.config.system.build.toplevel) (
lib.filterAttrs (n: _v: builtins.any (a: a == system) meta.${n}.arch) top.self.nixosConfigurations
))
(builtins.mapAttrs
(
_n: v:
writeShellApplication {
name = "build-${n}";
runtimeInputs = [ ];
text = ''
nix build ".#${v.config.system.build.toplevel}"
'';
}
)
(lib.filterAttrs (n: _v: builtins.any (a: a == system) meta.${n}.arch) top.self.nixosConfigurations)
)
# Adds all packages as a check
// (top.self.packages.${system})