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.nix40
1 files changed, 0 insertions, 40 deletions
diff --git a/modules/services/rclone/default.nix b/modules/services/rclone/default.nix
deleted file mode 100644
index cbef0c3..0000000
--- a/modules/services/rclone/default.nix
+++ /dev/null
@@ -1,40 +0,0 @@
-{ config, pkgs, lib, ... }:
-let
-  cfg = config.my.services.rclone;
-  secrets = config.age.secrets;
-in
-{
-  options.my.services.rclone = with lib; {
-    enable = mkEnableOption "rclone backup service";
-  };
-
-  config = lib.mkIf cfg.enable {
-    systemd = {
-      packages = [ pkgs.rclone ];
-      timers.rclone-sync = {
-        description = "synchronize restic repository to GCS";
-        wantedBy = [ "timers.target" ];
-        partOf = [ "rclone-sync.service" ];
-        timerConfig = { OnCalendar = "02:00"; };
-      };
-      services.rclone-sync = {
-        description = "synchronize restic repository to GCS";
-        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"
-            ];
-          };
-      };
-    };
-  };
-}