aboutsummaryrefslogtreecommitdiffstats
path: root/pkgs/populate/default.nix
diff options
context:
space:
mode:
authorJörg Thalheim <joerg@thalheim.io>2019-12-22 13:07:51 +0000
committerLassulus <github@lassul.us>2019-12-23 21:18:35 +0100
commitfff9b24ec98515cdd19cb3d6490b6214bacae792 (patch)
tree93f9ffe1d0e3dc8fddc5cf6546ae490ba4a79102 /pkgs/populate/default.nix
parentf2f8cbf1afcb2c26d11e5f82c0b523b2cb10205c (diff)
populate file: add exclude option
Diffstat (limited to 'pkgs/populate/default.nix')
-rw-r--r--pkgs/populate/default.nix7
1 files changed, 5 insertions, 2 deletions
diff --git a/pkgs/populate/default.nix b/pkgs/populate/default.nix
index 2b283a8..3e02aea 100644
--- a/pkgs/populate/default.nix
+++ b/pkgs/populate/default.nix
@@ -45,7 +45,7 @@ let
'';
pop.file = target: source: let
- configAttrs = ["useChecksum"];
+ configAttrs = ["useChecksum" "exclude"];
config = filterAttrs (name: _: elem name configAttrs) source;
in
rsync' target config (quote source.path);
@@ -156,8 +156,11 @@ let
source_path=$source_path/
fi
${rsync}/bin/rsync \
- ${optionalString (config.useChecksum or false) /* sh */ "--checksum"} \
+ ${optionalString config.useChecksum /* sh */ "--checksum"} \
${optionalString target.sudo /* sh */ "--rsync-path=\"sudo rsync\""} \
+ ${concatMapStringsSep " "
+ (pattern: /* sh */ "--exclude ${quote pattern}")
+ config.exclude} \
-e ${quote (ssh' target)} \
-vFrlptD \
--delete-excluded \