diff --git a/nixos/modules/services/backup/sanoid.nix b/nixos/modules/services/backup/sanoid.nix index 1baf08f4622f..b8b64075b1d5 100644 --- a/nixos/modules/services/backup/sanoid.nix +++ b/nixos/modules/services/backup/sanoid.nix @@ -57,6 +57,42 @@ let 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 {