From e65dfab2381ad85d96c80d537d928ae4b57a0936 Mon Sep 17 00:00:00 2001 From: Astro Date: Wed, 10 Nov 2021 00:33:42 +0100 Subject: [PATCH] flake.nix: add prebuild-all-remote --- flake.nix | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/flake.nix b/flake.nix index 1e61559b..4efda836 100644 --- a/flake.nix +++ b/flake.nix @@ -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 //