summaryrefslogtreecommitdiffstats
path: root/pkgs
diff options
context:
space:
mode:
authorlassulus <lass@blue.r>2019-10-20 17:48:32 +0200
committerlassulus <lassulus@lassul.us>2019-10-23 20:14:23 +0200
commit6d1c35ea2cd594db580918fedc8124f4786875af (patch)
treeaf4d2fefe18548f47ef845960fb4455cfd57269a /pkgs
parent8f44460003ae10f543ccb6a29f15b57e42ca3aad (diff)
writeDeploy: add fast option
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/krops/default.nix21
1 files changed, 17 insertions, 4 deletions
diff --git a/pkgs/krops/default.nix b/pkgs/krops/default.nix
index a9a9e34..a83e88c 100644
--- a/pkgs/krops/default.nix
+++ b/pkgs/krops/default.nix
@@ -36,18 +36,31 @@ in
];
};
- writeDeploy = name: { backup ? false, force ? false, source, target }: let
+ writeDeploy = name: {
+ backup ? false,
+ fast ? false,
+ force ? false,
+ source,
+ target
+ }: let
target' = lib.mkTarget target;
in
writeDash name ''
set -efu
${populate { inherit backup force source; target = target'; }}
- ${rebuild ["dry-build"] target'}
- ${build target'}
+ ${lib.optionalString (! fast) ''
+ ${rebuild ["dry-build"] target'}
+ ${build target'}
+ ''}
${rebuild ["switch"] target'}
'';
- writeTest = name: { backup ? false, force ? false, source, target }: let
+ writeTest = name: {
+ backup ? false,
+ force ? false,
+ source,
+ target
+ }: let
target' = lib.mkTarget target;
in
assert lib.isLocalTarget target';