about summary refs log tree commit diff
path: root/modules/services/rclone
diff options
context:
space:
mode:
Diffstat (limited to 'modules/services/rclone')
-rw-r--r--modules/services/rclone/default.nix23
1 files changed, 13 insertions, 10 deletions
diff --git a/modules/services/rclone/default.nix b/modules/services/rclone/default.nix
index afba321..cbef0c3 100644
--- a/modules/services/rclone/default.nix
+++ b/modules/services/rclone/default.nix
@@ -2,7 +2,8 @@
 let
   cfg = config.my.services.rclone;
   secrets = config.age.secrets;
-in {
+in
+{
   options.my.services.rclone = with lib; {
     enable = mkEnableOption "rclone backup service";
   };
@@ -18,19 +19,21 @@ in {
       };
       services.rclone-sync = {
         description = "synchronize restic repository to GCS";
-        serviceConfig = let
-          rcloneOptions = "--config=${
+        serviceConfig =
+          let
+            rcloneOptions = "--config=${
               secrets."rclone/config.ini".path
             } --gcs-service-account-file=${
               secrets."rclone/gcs_service_account.json".path
             } --fast-list --verbose";
-        in {
-          Type = "oneshot";
-          ExecStart = [
-            "${pkgs.rclone}/bin/rclone ${rcloneOptions} sync /data/slow/backups/systems gbackup:fcuny-backups-systems"
-            "${pkgs.rclone}/bin/rclone ${rcloneOptions} sync /data/slow/backups/users gbackup:fcuny-backups-users"
-          ];
-        };
+          in
+          {
+            Type = "oneshot";
+            ExecStart = [
+              "${pkgs.rclone}/bin/rclone ${rcloneOptions} sync /data/slow/backups/systems gbackup:fcuny-backups-systems"
+              "${pkgs.rclone}/bin/rclone ${rcloneOptions} sync /data/slow/backups/users gbackup:fcuny-backups-users"
+            ];
+          };
       };
     };
   };