diff options
author | ajs124 <git@ajs124.de> | 2023-12-12 22:17:06 +0100 |
---|---|---|
committer | github-actions[bot] <github-actions[bot]@users.noreply.github.com> | 2023-12-13 22:16:19 +0000 |
commit | e15f2d7583b95af41ff7456858a53a1d15f388dc (patch) | |
tree | dbfcfe364d7e105f3fe330b2f4dc1c4e43f4e32e | |
parent | b8d5b5ea350bd2d48b05f7cfaec55c89159d0612 (diff) |
nixos/restic: append PATH in wrappers instead of overwriting
fixes "mount" (cherry picked from commit be0a6b0dd6b72667a930a8e26bf4ae9e99b311a5)
-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 87595f39796d9..d7cd6a29c52c6 100644 --- a/nixos/modules/services/backup/restic.nix +++ b/nixos/modules/services/backup/restic.nix @@ -391,10 +391,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); |