Unverified Commit 7379cc70 authored by Sandro Jäckel's avatar Sandro Jäckel Committed by GitHub
Browse files

services.restic: use getExe instead of hard-coded path (#376416)

parents ddcc0fe7 bf121f06
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -345,7 +345,7 @@ in
          "--what='sleep'"
          "--why=${lib.escapeShellArg "Scheduled backup ${name}"} "
        ];
        resticCmd = "${lib.optionalString backup.inhibitsSleep inhibitCmd}${backup.package}/bin/restic${extraOptions}";
        resticCmd = "${lib.optionalString backup.inhibitsSleep inhibitCmd}${lib.getExe backup.package}${extraOptions}";
        excludeFlags = lib.optional (
          backup.exclude != [ ]
        ) "--exclude-file=${pkgs.writeText "exclude-patterns" (lib.concatStringsSep "\n" backup.exclude)}";
@@ -455,7 +455,7 @@ in
      name: backup:
      let
        extraOptions = lib.concatMapStrings (arg: " -o ${arg}") backup.extraOptions;
        resticCmd = "${backup.package}/bin/restic${extraOptions}";
        resticCmd = "${lib.getExe backup.package}${extraOptions}";
      in
      pkgs.writeShellScriptBin "restic-${name}" ''
        set -a  # automatically export variables