Merge pull request #285807 from MinerSebas/prometheus-restic-exporter
prometheus-restic-exporter: 1.4.0 -> 1.5.0
This commit is contained in:
commit
f05e5f3a51
2 changed files with 10 additions and 9 deletions
|
@ -93,12 +93,14 @@ in
|
|||
};
|
||||
|
||||
serviceOpts = {
|
||||
serviceConfig = {
|
||||
ExecStart = ''
|
||||
script = ''
|
||||
export RESTIC_PASSWORD_FILE=$CREDENTIALS_DIRECTORY/RESTIC_PASSWORD_FILE
|
||||
${pkgs.prometheus-restic-exporter}/bin/restic-exporter.py \
|
||||
${concatStringsSep " \\\n " cfg.extraFlags}
|
||||
'';
|
||||
serviceConfig = {
|
||||
EnvironmentFile = mkIf (cfg.environmentFile != null) cfg.environmentFile;
|
||||
LoadCredential = [ "RESTIC_PASSWORD_FILE:${cfg.passwordFile}" ];
|
||||
};
|
||||
environment =
|
||||
let
|
||||
|
@ -108,8 +110,7 @@ in
|
|||
toRcloneVal = v: if lib.isBool v then lib.boolToString v else v;
|
||||
in
|
||||
{
|
||||
RESTIC_REPO_URL = cfg.repository;
|
||||
RESTIC_REPO_PASSWORD_FILE = cfg.passwordFile;
|
||||
RESTIC_REPOSITORY = cfg.repository;
|
||||
LISTEN_ADDRESS = cfg.listenAddress;
|
||||
LISTEN_PORT = toString cfg.port;
|
||||
REFRESH_INTERVAL = toString cfg.refreshInterval;
|
||||
|
|
|
@ -8,13 +8,13 @@
|
|||
|
||||
stdenvNoCC.mkDerivation rec {
|
||||
pname = "prometheus-restic-exporter";
|
||||
version = "1.4.0";
|
||||
version = "1.5.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ngosang";
|
||||
repo = "restic-exporter";
|
||||
rev = version;
|
||||
hash = "sha256-Qwhlecginl5+V+iddN/vIHfJA1kQOZtscECsoD4LJPE=";
|
||||
hash = "sha256-SC2ZCIQ33RaFI9+l/WI6edNzGEtsxJ2bBdeGNMHuyqY=";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
|
@ -26,7 +26,7 @@ stdenvNoCC.mkDerivation rec {
|
|||
|
||||
install -D -m0755 restic-exporter.py $out/bin/restic-exporter.py
|
||||
|
||||
substituteInPlace $out/bin/restic-exporter.py --replace \"restic\" \"${lib.makeBinPath [ restic ]}/restic\"
|
||||
substituteInPlace $out/bin/restic-exporter.py --replace-fail \"restic\" \"${lib.makeBinPath [ restic ]}/restic\"
|
||||
|
||||
patchShebangs $out/bin/restic-exporter.py
|
||||
|
||||
|
|
Loading…
Reference in a new issue