about summary refs log tree commit diff
path: root/hosts
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--hosts/common/server/rclone.nix11
1 files changed, 6 insertions, 5 deletions
diff --git a/hosts/common/server/rclone.nix b/hosts/common/server/rclone.nix
index 808273e..c939e7b 100644
--- a/hosts/common/server/rclone.nix
+++ b/hosts/common/server/rclone.nix
@@ -16,13 +16,14 @@
     };
     services.rclone-sync = {
       description = "synchronize restic repository to GCS";
-      environment.RCLONE_GCS_SERVICE_ACCOUNT_CREDENTIALS =
-        config.age.secrets.rclone-gcs-sa.path;
-      serviceConfig = {
+      serviceConfig = let
+        rcloneOptions =
+          "--config=${config.age.secrets.rclone-config.path} --gcs-service-account-file==${config.age.secrets.rclone-gcs-sa.path} --fast-list --verbose";
+      in {
         Type = "oneshot";
         ExecStart = [
-          "${pkgs.rclone}/bin/rclone --config=${config.age.secrets.rclone-config.path} --fast-list --verbose sync /data/slow/backups gbackup:fcuny-backups-systems"
-          "${pkgs.rclone}/bin/rclone --config=${config.age.secrets.rclone-config.path} --fast-list --verbose sync /data/slow/backups gbackup:fcuny-backups-users"
+          "${pkgs.rclone}/bin/rclone ${rcloneOptions} sync /data/slow/backups gbackup:fcuny-backups-systems"
+          "${pkgs.rclone}/bin/rclone ${rcloneOptions} sync /data/slow/backups gbackup:fcuny-backups-users"
         ];
       };
     };