Skip to content

Commit

Permalink
nixos/prometheus-restic-exporter: set cache dir (NixOS#378228)
Browse files Browse the repository at this point in the history
* nixos/prometheus-restic-exporter: set cache dir

* prometheus-restic-exporter: use systemd variable for cachedir
  • Loading branch information
tetov authored Feb 3, 2025
1 parent b4ea290 commit 494b240
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand All @@ -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)
Expand Down

0 comments on commit 494b240

Please sign in to comment.