mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 08:23:09 +00:00
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
@ -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 New Issue
Block a user