Fixup bug with zfs replication
This commit is contained in:
parent
cfacbff288
commit
773248e4e5
3 changed files with 21 additions and 0 deletions
|
|
@ -43,6 +43,7 @@
|
|||
system = "x86_64-linux";
|
||||
specialArgs = { inherit unstablePkgs updatePkgs nixos-hardware; };
|
||||
modules = [
|
||||
{ nixpkgs.overlays = [ (import ./overlays/zfs-replicate.nix) ]; }
|
||||
./hosts/axl/configuration.nix
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
|
|
|
|||
13
overlays/zfs-replicate-env-fix.patch
Normal file
13
overlays/zfs-replicate-env-fix.patch
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
diff --git a/zfs/replicate/filesystem/list.py b/zfs/replicate/filesystem/list.py
|
||||
index 5e892e6..f33e11e 100644
|
||||
--- a/zfs/replicate/filesystem/list.py
|
||||
+++ b/zfs/replicate/filesystem/list.py
|
||||
@@ -42,4 +42,4 @@ def list( # pylint: disable=W0622
|
||||
def _list(filesystem: FileSystem) -> str:
|
||||
options = ["-H", "-o name,readonly", "-t filesystem,volume", "-r"]
|
||||
|
||||
- return f"/usr/bin/env - zfs list {' '.join(options)} '{filesystem.name}'"
|
||||
+ return f"/usr/bin/env zfs list {' '.join(options)} '{filesystem.name}'"
|
||||
|
||||
|
||||
def _filesystems(zfs_list_output: bytes) -> List[FileSystem]:
|
||||
7
overlays/zfs-replicate.nix
Normal file
7
overlays/zfs-replicate.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
final: prev: {
|
||||
zfs-replicate = prev.zfs-replicate.overrideAttrs (oldAttrs: {
|
||||
patches = (oldAttrs.patches or []) ++ [
|
||||
./zfs-replicate-env-fix.patch
|
||||
];
|
||||
});
|
||||
}
|
||||
Loading…
Reference in a new issue