nixos/sanoid: add missing sanoid options regarding script hooks. (#412248)

Sandro c6c6d0bc 8c62528d

Changed files
+36
nixos
modules
services
backup
+36
nixos/modules/services/backup/sanoid.nix
···
type = with lib.types; nullOr bool;
default = null;
};
};
datasetOptions = rec {
···
type = with lib.types; nullOr bool;
default = null;
};
+
+
pre_snapshot_script = lib.mkOption {
+
description = "Script to run before taking snapshot.";
+
type = with lib.types; nullOr str;
+
default = null;
+
};
+
+
post_snapshot_script = lib.mkOption {
+
description = "Script to run after taking snapshot.";
+
type = with lib.types; nullOr str;
+
default = null;
+
};
+
+
pruning_script = lib.mkOption {
+
description = "Script to run after pruning snapshot.";
+
type = with lib.types; nullOr str;
+
default = null;
+
};
+
+
no_inconsistent_snapshot = lib.mkOption {
+
description = "Whether to take a snapshot if the pre script fails";
+
type = with lib.types; nullOr bool;
+
default = null;
+
};
+
+
force_post_snapshot_script = lib.mkOption {
+
description = "Whether to run the post script if the pre script fails";
+
type = with lib.types; nullOr bool;
+
default = null;
+
};
+
+
script_timeout = lib.mkOption {
+
description = "Time limit for pre/post/pruning script execution time (<=0 for infinite).";
+
type = with lib.types; nullOr int;
+
default = null;
+
};
};
datasetOptions = rec {