about summary refs log tree commit diff
path: root/nixos/modules/services/backup
diff options
context:
space:
mode:
authorMichel Weitbrecht <slothofanarchy1@gmail.com>2020-05-08 18:37:51 +0200
committerMichel Weitbrecht <slothofanarchy1@gmail.com>2020-05-11 14:26:39 +0200
commitc46b26b9ad63d6f6f0e4e16bb0a660dd937032e1 (patch)
tree80af5a98cd5d80c8d763b60b975ed33c4ef3281c /nixos/modules/services/backup
parentafbab5a3f3e3e793d61c239ec73b9371c9bfc16b (diff)
downloadnixlib-c46b26b9ad63d6f6f0e4e16bb0a660dd937032e1.tar
nixlib-c46b26b9ad63d6f6f0e4e16bb0a660dd937032e1.tar.gz
nixlib-c46b26b9ad63d6f6f0e4e16bb0a660dd937032e1.tar.bz2
nixlib-c46b26b9ad63d6f6f0e4e16bb0a660dd937032e1.tar.lz
nixlib-c46b26b9ad63d6f6f0e4e16bb0a660dd937032e1.tar.xz
nixlib-c46b26b9ad63d6f6f0e4e16bb0a660dd937032e1.tar.zst
nixlib-c46b26b9ad63d6f6f0e4e16bb0a660dd937032e1.zip
nixos/znapzend: Use generic mbuffer path
The configured mbuffer path will be called on both the source and target
system. If you use pkgs.mbuffer from the source host and the target host
does not have this exact derivation, you will get a broken pipe when
sending snapshots. This is the case when transferring to a non-NixOS
system or to a host with a different mbuffer version.
Diffstat (limited to 'nixos/modules/services/backup')
-rw-r--r--nixos/modules/services/backup/znapzend.nix3
1 files changed, 2 insertions, 1 deletions
diff --git a/nixos/modules/services/backup/znapzend.nix b/nixos/modules/services/backup/znapzend.nix
index 98cd647f61ac..134966a5a35f 100644
--- a/nixos/modules/services/backup/znapzend.nix
+++ b/nixos/modules/services/backup/znapzend.nix
@@ -268,7 +268,8 @@ let
 
   mkSrcAttrs = srcCfg: with srcCfg; {
     enabled = onOff enable;
-    mbuffer = with mbuffer; if enable then "${pkgs.mbuffer}/bin/mbuffer"
+    # mbuffer is not referenced by its full path to accomodate non-NixOS systems or differing mbuffer versions between source and target
+    mbuffer = with mbuffer; if enable then "mbuffer"
         + optionalString (port != null) ":${toString port}" else "off";
     mbuffer_size = mbuffer.size;
     post_znap_cmd = nullOff postsnap;