services.restic: use getExe instead of hard-coded path (#376416)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user