🔨 add addSys from ˈt͡sɛːzaɐ
All checks were successful
Build all NixOS Configurations / nix build (push) Successful in 11m56s
All checks were successful
Build all NixOS Configurations / nix build (push) Successful in 11m56s
This commit is contained in:
parent
c729802b6e
commit
40854dd628
1 changed files with 30 additions and 0 deletions
30
nix/buildAllNixosConfigurations.nix
Normal file
30
nix/buildAllNixosConfigurations.nix
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
# buid all system locally is part of `nix flake check` with this flake parrt.
|
||||||
|
# todo make this an application : `nix run .#buildAllNixosConfigurations`
|
||||||
|
{ inputs, self, ... }:
|
||||||
|
{
|
||||||
|
perSystem =
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
system,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib;
|
||||||
|
{
|
||||||
|
checks =
|
||||||
|
let
|
||||||
|
all = attrNames self.nixosConfigurations;
|
||||||
|
linkFor = sys: "ln -s ${self.nixosConfigurations.${sys}.config.system.build.toplevel} $out/${sys}";
|
||||||
|
links = filt: builtins.concatStringsSep "\n" (map linkFor (filter (name: filt name) all));
|
||||||
|
toplevels =
|
||||||
|
filt:
|
||||||
|
pkgs.runCommandLocal "toplevels" { } ''
|
||||||
|
mkdir $out
|
||||||
|
${links filt}
|
||||||
|
'';
|
||||||
|
in
|
||||||
|
{
|
||||||
|
buildAllNixosConfigurations = toplevels (_: true);
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue