Skip to content

Commit c6c6d0b

Browse files
nixos/sanoid: add missing sanoid options regarding script hooks. (NixOS#412248)
2 parents 8c62528 + c0066c4 commit c6c6d0b

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

nixos/modules/services/backup/sanoid.nix

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,42 @@ let
5757
type = with lib.types; nullOr bool;
5858
default = null;
5959
};
60+
61+
pre_snapshot_script = lib.mkOption {
62+
description = "Script to run before taking snapshot.";
63+
type = with lib.types; nullOr str;
64+
default = null;
65+
};
66+
67+
post_snapshot_script = lib.mkOption {
68+
description = "Script to run after taking snapshot.";
69+
type = with lib.types; nullOr str;
70+
default = null;
71+
};
72+
73+
pruning_script = lib.mkOption {
74+
description = "Script to run after pruning snapshot.";
75+
type = with lib.types; nullOr str;
76+
default = null;
77+
};
78+
79+
no_inconsistent_snapshot = lib.mkOption {
80+
description = "Whether to take a snapshot if the pre script fails";
81+
type = with lib.types; nullOr bool;
82+
default = null;
83+
};
84+
85+
force_post_snapshot_script = lib.mkOption {
86+
description = "Whether to run the post script if the pre script fails";
87+
type = with lib.types; nullOr bool;
88+
default = null;
89+
};
90+
91+
script_timeout = lib.mkOption {
92+
description = "Time limit for pre/post/pruning script execution time (<=0 for infinite).";
93+
type = with lib.types; nullOr int;
94+
default = null;
95+
};
6096
};
6197

6298
datasetOptions = rec {

0 commit comments

Comments
 (0)