From 98e01cdbfa047a32c1beb73438c5b93ca0592978 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Fri, 10 Jun 2022 11:42:32 -0700 Subject: fix(fmt): correct formatting for all nix files This was done by running `nixpkgs-fmt .'. Change-Id: I4ea6c1e759bf468d08074be2111cbc7af72df295 Reviewed-on: https://cl.fcuny.net/c/world/+/404 Tested-by: CI Reviewed-by: Franck Cuny --- modules/services/rclone/default.nix | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'modules/services/rclone') 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" + ]; + }; }; }; }; -- cgit 1.4.1