summaryrefslogtreecommitdiffstats
path: root/pkgs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2019-07-16 22:23:50 +0200
committertv <tv@krebsco.de>2019-07-16 22:23:50 +0200
commit14a54637ce53ac07aae5ff8bda9d411c0efd5823 (patch)
tree0b028abbe92f54bca5c376108f487c324261fe92 /pkgs
parent79aa2c6a88dedb11f0971b849c12671d1c90a73b (diff)
pkgs write{Deploy,Test}: allow backup of target
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/krops/default.nix8
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 \