diff options
author | tv <tv@krebsco.de> | 2019-12-30 14:17:06 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-30 14:17:06 +0100 |
commit | f1b7112ac3cbe090e96f2c82c525b6db69b82034 (patch) | |
tree | 28d3132d3628d9e53fefec2d94a98cc564e2d94f /pkgs | |
parent | fce5826802ca36d451978baa83a97bfbc1d2475f (diff) | |
parent | ea7e0c3a35e94eec5242d9344db9bc4d54056497 (diff) |
Merge pull request #11 from Mic92/build-hostv1.19.0
Support for build hosts
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/krops/default.nix | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/pkgs/krops/default.nix b/pkgs/krops/default.nix index a3e7745..16ef936 100644 --- a/pkgs/krops/default.nix +++ b/pkgs/krops/default.nix @@ -47,21 +47,36 @@ in writeDeploy = name: { backup ? false, + buildTarget ? null, + crossDeploy ? false, fast ? false, force ? false, source, target }: let + buildTarget' = + if buildTarget == null + then target' + else lib.mkTarget buildTarget; target' = lib.mkTarget target; in writeDash name '' set -efu + ${lib.optionalString (buildTarget' != target') + (populate { inherit backup force source; target = buildTarget'; })} ${populate { inherit backup force source; target = target'; }} ${lib.optionalString (! fast) '' - ${rebuild ["dry-build"] target'} - ${build target'} + ${rebuild ["dry-build"] buildTarget'} + ${build buildTarget'} ''} - ${rebuild ["switch"] target'} + ${rebuild ([ + "switch" + ] ++ lib.optionals crossDeploy [ + "--no-build-nix" + ] ++ lib.optionals (buildTarget' != target') [ + "--build-host" "${buildTarget'.user}@${buildTarget'.host}" + "--target-host" "${target'.user}@${target'.host}" + ]) buildTarget'} ''; writeTest = name: { |