Merge pull request #273834 from ajs124/restic-wrappers-append-path
nixos/restic: append PATH in wrappers instead of overwriting
This commit is contained in:
commit
27bcbd780f
1 changed files with 2 additions and 1 deletions
|
@ -384,10 +384,11 @@ in
|
|||
${lib.optionalString (backup.environmentFile != null) "source ${backup.environmentFile}"}
|
||||
# set same environment variables as the systemd service
|
||||
${lib.pipe config.systemd.services."restic-backups-${name}".environment [
|
||||
(lib.filterAttrs (_: v: v != null))
|
||||
(lib.filterAttrs (n: v: v != null && n != "PATH"))
|
||||
(lib.mapAttrsToList (n: v: "${n}=${v}"))
|
||||
(lib.concatStringsSep "\n")
|
||||
]}
|
||||
PATH=${config.systemd.services."restic-backups-${name}".environment.PATH}:$PATH
|
||||
|
||||
exec ${resticCmd} $@
|
||||
'') (lib.filterAttrs (_: v: v.createWrapper) config.services.restic.backups);
|
||||
|
|
Loading…
Reference in a new issue