From 5bee663e3009a0c25dc80762f6991ae5710c80df Mon Sep 17 00:00:00 2001 From: nixbitcoin Date: Thu, 3 Mar 2022 15:53:04 +0000 Subject: [PATCH] backups: bring in line with upstream duplicity Also, tell users that they can set `services.duplicity.*` to further configure the backup. --- modules/backups.nix | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/modules/backups.nix b/modules/backups.nix index 8b140cf..9f2220a 100644 --- a/modules/backups.nix +++ b/modules/backups.nix @@ -3,7 +3,16 @@ with lib; let options.services.backups = { - enable = mkEnableOption "Backups service"; + enable = mkOption { + type = types.bool; + default = false; + description = '' + Enable backups of node data. + This uses the NixOS duplicity service. + To further configure the backup, you can set NixOS options `services.duplicity.*`. + The `services.duplicity.cleanup.*` options are particularly useful. + ''; + }; with-bulk-data = mkOption { type = types.bool; default = false; @@ -87,8 +96,8 @@ in { enable = true; extraFlags = [ "--include-filelist" "${filelist}" - "--full-if-older-than" "1M" ]; + fullIfOlderThan = mkDefault "1M"; targetUrl = cfg.destination; frequency = cfg.frequency; secretFile = "${config.nix-bitcoin.secretsDir}/backup-encryption-env";