global(fs): add zfs replication options
This commit is contained in:
parent
740acdc152
commit
9d3600095c
2 changed files with 48 additions and 0 deletions
|
@ -6,6 +6,7 @@
|
|||
in {
|
||||
imports = [
|
||||
./split.nix
|
||||
./replication.nix
|
||||
];
|
||||
|
||||
# -o ashift=12
|
||||
|
@ -42,6 +43,24 @@ in {
|
|||
description = "UUID of store filesystem";
|
||||
};
|
||||
};
|
||||
|
||||
replication = {
|
||||
enable = mkEnableOption "zfs replication to remote";
|
||||
remote = mkOption {
|
||||
type = with types; str;
|
||||
description = "remote host as replication destination";
|
||||
};
|
||||
datasets = mkOption {
|
||||
type = with types; listOf str;
|
||||
default = [ "persist" "service" "storage" ];
|
||||
description = "list of filesystems to perform replication for";
|
||||
};
|
||||
sendOptions = mkOption {
|
||||
type = with types; str;
|
||||
default = "w";
|
||||
description = "send options for all datasets";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf (cfg.type == "zfs") {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue