diff --git a/nixos/hosts/asxpio-services/replica.nix b/nixos/hosts/asxpio-services/replica.nix index ffd3ccc..00cc4b2 100644 --- a/nixos/hosts/asxpio-services/replica.nix +++ b/nixos/hosts/asxpio-services/replica.nix @@ -55,8 +55,12 @@ in after = [ "network-online.target" ]; onFailure = [ "alert-mail@%n.service" ]; path = [ pkgs.rclone ]; + # rclone looks for a home directory even when its remotes come from + # the environment + environment.HOME = "/var/lib/s3-replicate"; serviceConfig = { Type = "oneshot"; + StateDirectory = "s3-replicate"; EnvironmentFile = config.sops.templates."s3-replicate.env".path; TimeoutStartSec = "12h"; };