diff options
author | Janik <80165193+Janik-Haag@users.noreply.github.com> | 2023-12-13 23:15:50 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-13 23:15:50 +0100 |
commit | 27bcbd780fc8f56ff6ac34c3d37ec5bffa8aa3ad (patch) | |
tree | e7b5ffcf58c471371a3bc1c12a7a7112b31da781 /nixos/modules | |
parent | dc92ffa69cd5278bc68b3469b48d350db8355cfa (diff) | |
parent | be0a6b0dd6b72667a930a8e26bf4ae9e99b311a5 (diff) |
Merge pull request #273834 from ajs124/restic-wrappers-append-path
nixos/restic: append PATH in wrappers instead of overwriting
Diffstat (limited to 'nixos/modules')
-rw-r--r-- | nixos/modules/services/backup/restic.nix | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/nixos/modules/services/backup/restic.nix b/nixos/modules/services/backup/restic.nix index e3eb504e0adfc..b222dd952d159 100644 --- a/nixos/modules/services/backup/restic.nix +++ b/nixos/modules/services/backup/restic.nix @@ -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); |