summaryrefslogtreecommitdiffstats
path: root/krebs/3modules/backup.nix
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2016-01-05 21:47:55 +0100
committertv <tv@krebsco.de>2016-01-05 21:47:55 +0100
commite09559bb786c7cf639dc1428bbe2ed6ba7ced9fb (patch)
tree5037bdbf9263064888b7fb73d76fb9aebcde2f01 /krebs/3modules/backup.nix
parent8c365dbe9b4549400a03ca75aef18e23a4648681 (diff)
krebs.backup.plans.*.{snapshots,startAt} += default
Diffstat (limited to 'krebs/3modules/backup.nix')
-rw-r--r--krebs/3modules/backup.nix10
1 files changed, 9 insertions, 1 deletions
diff --git a/krebs/3modules/backup.nix b/krebs/3modules/backup.nix
index 01bb16a2b..20bc5dee0 100644
--- a/krebs/3modules/backup.nix
+++ b/krebs/3modules/backup.nix
@@ -28,9 +28,17 @@ let
type = types.krebs.file-location;
};
startAt = mkOption {
- type = types.str;
+ default = "hourly";
+ type = types.str; # TODO systemd.time(7)'s calendar event
};
snapshots = mkOption {
+ default = {
+ hourly = { format = "%Y-%m-%dT%H"; retain = 4; };
+ daily = { format = "%Y-%m-%d"; retain = 7; };
+ weekly = { format = "%YW%W"; retain = 4; };
+ monthly = { format = "%Y-%m"; retain = 12; };
+ yearly = { format = "%Y"; };
+ };
type = types.attrsOf (types.submodule {
options = {
format = mkOption {