diff --git a/nixos/modules/services/monitoring/prometheus/exporters/restic.nix b/nixos/modules/services/monitoring/prometheus/exporters/restic.nix index c8de20be563c33..615d78317d38d7 100644 --- a/nixos/modules/services/monitoring/prometheus/exporters/restic.nix +++ b/nixos/modules/services/monitoring/prometheus/exporters/restic.nix @@ -140,6 +140,7 @@ in ${concatStringsSep " \\\n " cfg.extraFlags} ''; serviceConfig = { + CacheDirectory = "restic-exporter"; EnvironmentFile = mkIf (cfg.environmentFile != null) cfg.environmentFile; LoadCredential = [ "RESTIC_PASSWORD_FILE:${cfg.passwordFile}" @@ -156,6 +157,7 @@ in LISTEN_ADDRESS = cfg.listenAddress; LISTEN_PORT = toString cfg.port; REFRESH_INTERVAL = toString cfg.refreshInterval; + RESTIC_CACHE_DIR = "$CACHE_DIRECTORY"; } // (mapAttrs' ( name: value: nameValuePair (rcloneAttrToOpt name) (toRcloneVal value)