Skip to content

Commit

Permalink
nixos/restic: append PATH in wrappers instead of overwriting
Browse files Browse the repository at this point in the history
fixes "mount"

(cherry picked from commit be0a6b0)
  • Loading branch information
ajs124 authored and github-actions[bot] committed Dec 13, 2023
1 parent b8d5b5e commit e15f2d7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion nixos/modules/services/backup/restic.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit e15f2d7

Please sign in to comment.