From 06d745e572223b471187f6b171f43a21fc03ce5e Mon Sep 17 00:00:00 2001 From: Greg Hellings Date: Wed, 10 Dec 2025 07:02:12 -0600 Subject: [PATCH] Make checks a build step --- checks.nix | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/checks.nix b/checks.nix index 3e846a0..6695515 100644 --- a/checks.nix +++ b/checks.nix @@ -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})