diff options
Diffstat (limited to 'modules/services')
-rw-r--r-- | modules/services/default.nix | 1 | ||||
-rw-r--r-- | modules/services/rclone/default.nix | 40 |
2 files changed, 0 insertions, 41 deletions
diff --git a/modules/services/default.nix b/modules/services/default.nix index e4f6e37..4966ed7 100644 --- a/modules/services/default.nix +++ b/modules/services/default.nix @@ -12,7 +12,6 @@ ./navidrome ./nginx ./pcscd - ./rclone ./samba ./sendsms ./ssh-server 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" - ]; - }; - }; - }; - }; -} |