diff options
author | Michel Weitbrecht <slothofanarchy1@gmail.com> | 2020-05-08 18:37:51 +0200 |
---|---|---|
committer | Michel Weitbrecht <slothofanarchy1@gmail.com> | 2020-05-11 14:26:39 +0200 |
commit | c46b26b9ad63d6f6f0e4e16bb0a660dd937032e1 (patch) | |
tree | 80af5a98cd5d80c8d763b60b975ed33c4ef3281c | |
parent | afbab5a3f3e3e793d61c239ec73b9371c9bfc16b (diff) | |
download | nixpkgs-c46b26b9ad63d6f6f0e4e16bb0a660dd937032e1.tar nixpkgs-c46b26b9ad63d6f6f0e4e16bb0a660dd937032e1.tar.gz nixpkgs-c46b26b9ad63d6f6f0e4e16bb0a660dd937032e1.tar.bz2 nixpkgs-c46b26b9ad63d6f6f0e4e16bb0a660dd937032e1.tar.lz nixpkgs-c46b26b9ad63d6f6f0e4e16bb0a660dd937032e1.tar.xz nixpkgs-c46b26b9ad63d6f6f0e4e16bb0a660dd937032e1.tar.zst nixpkgs-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.
-rw-r--r-- | nixos/modules/services/backup/znapzend.nix | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/nixos/modules/services/backup/znapzend.nix b/nixos/modules/services/backup/znapzend.nix index 98cd647f61a..134966a5a35 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; |