flake: add a check-host-configs target to ensure all hosts are buildable

This commit is contained in:
Colin 2023-09-02 01:25:20 +00:00
parent 20aef83496
commit d33b6eec59
1 changed files with 13 additions and 0 deletions

View File

@ -333,6 +333,19 @@
-I ../../
'');
};
check-host-configs = {
type = "app";
program = builtins.toString (pkgs.writeShellScript
"check-host-configs"
(builtins.concatStringsSep "\n" (builtins.map
(host: "nix build '.#nixosConfigurations.${host}.config.system.build.toplevel' --out-link ./result-${host} -j1 $@ &")
[ "desko" "lappy" "servo" "moby" "rescue" ]
# not part of the `map`. wait for all builds to complete
++ [ "wait" ]
))
);
};
};
templates = {