about summary refs log tree commit diff
path: root/modules/services
diff options
context:
space:
mode:
Diffstat (limited to 'modules/services')
-rw-r--r--modules/services/backup/default.nix20
1 files changed, 9 insertions, 11 deletions
diff --git a/modules/services/backup/default.nix b/modules/services/backup/default.nix
index d681a07..3481f3f 100644
--- a/modules/services/backup/default.nix
+++ b/modules/services/backup/default.nix
@@ -12,7 +12,7 @@ in
 
     repository = mkOption {
       type = types.str;
-      example = "/data/slow/backups/system";
+      example = "/data/slow/backups/hosts";
       description = "The repository to back up to";
     };
 
@@ -22,6 +22,13 @@ in
       description = "Read the repository's password from this path";
     };
 
+    extraOptions = mkOption {
+      type = with types; listOf str;
+      default = [ ];
+      example = [ "sftp.command='ssh ....'" ];
+      description = "Extra options to restic";
+    };
+
     paths = mkOption {
       type = with types; listOf str;
       default = [ ];
@@ -72,15 +79,6 @@ in
         When to run the backup. See man systemd.timer for details.
       '';
     };
-
-    user = mkOption {
-      type = types.str;
-      default = "root";
-      description = ''
-        As which user the backup should run.
-      '';
-      example = "postgresql";
-    };
   };
 
   config = lib.mkIf cfg.enable {
@@ -91,7 +89,7 @@ in
         ++ lib.optional (builtins.length cfg.exclude != 0) excludeArg;
       # Take care of creating the repository if it doesn't exist
       initialize = true;
-      inherit (cfg) passwordFile pruneOpts timerConfig repository user;
+      inherit (cfg) passwordFile pruneOpts timerConfig repository extraOptions;
     };
   };
 }