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.
This commit is contained in:
Michel Weitbrecht 2020-05-08 18:37:51 +02:00
parent afbab5a3f3
commit c46b26b9ad
No known key found for this signature in database
GPG key ID: E3A33EFDDCE1C7AE

View file

@ -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;