flake.nix: add prebuild-all-remote

This commit is contained in:
Astro 2021-11-10 00:33:42 +01:00
parent 9ac30f5afa
commit e65dfab238
1 changed files with 14 additions and 0 deletions

View File

@ -115,6 +115,20 @@
'') (builtins.attrNames flakifiedHosts)}
'';
prebuild-all-remote = pkgs.writeScriptBin "prebuild-all" ''
#!${pkgs.runtimeShell} -e
nix copy --to ssh://$1 ${secrets}
nix copy --to ssh://$1 ${self}
set -x
ssh $1 -- nix build -vL --no-link ${
pkgs.lib.concatMapStringsSep " " (name:
"${self}#nixosConfigurations.${name}.config.system.build.toplevel"
) (builtins.attrNames flakifiedHosts)
}
'';
} //
overlayPkgs //