diff options
author | tv <tv@krebsco.de> | 2019-07-16 22:23:50 +0200 |
---|---|---|
committer | tv <tv@krebsco.de> | 2019-07-16 22:23:50 +0200 |
commit | 14a54637ce53ac07aae5ff8bda9d411c0efd5823 (patch) | |
tree | 0b028abbe92f54bca5c376108f487c324261fe92 | |
parent | 79aa2c6a88dedb11f0971b849c12671d1c90a73b (diff) |
pkgs write{Deploy,Test}: allow backup of target
-rw-r--r-- | pkgs/krops/default.nix | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pkgs/krops/default.nix b/pkgs/krops/default.nix index ff32b11..a9a9e34 100644 --- a/pkgs/krops/default.nix +++ b/pkgs/krops/default.nix @@ -36,24 +36,24 @@ in ]; }; - writeDeploy = name: { force ? false, source, target }: let + writeDeploy = name: { backup ? false, force ? false, source, target }: let target' = lib.mkTarget target; in writeDash name '' set -efu - ${populate { inherit force source; target = target'; }} + ${populate { inherit backup force source; target = target'; }} ${rebuild ["dry-build"] target'} ${build target'} ${rebuild ["switch"] target'} ''; - writeTest = name: { force ? false, source, target }: let + writeTest = name: { backup ? false, force ? false, source, target }: let target' = lib.mkTarget target; in assert lib.isLocalTarget target'; writeDash name '' set -efu - ${populate { inherit force source; target = target'; }} >&2 + ${populate { inherit backup force source; target = target'; }} >&2 NIX_PATH=${lib.escapeShellArg target'.path} \ ${nix}/bin/nix-build \ -A system \ |