diff options
author | ajs124 <git@ajs124.de> | 2023-12-12 22:17:06 +0100 |
---|---|---|
committer | ajs124 <git@ajs124.de> | 2023-12-13 16:24:50 +0100 |
commit | be0a6b0dd6b72667a930a8e26bf4ae9e99b311a5 (patch) | |
tree | 801d06e4d0fbc89f1849691b4c7c52f4e18f2284 /nixos/modules/services/backup | |
parent | 06e5eff89a17c8aede07f112058551687c041813 (diff) | |
download | nixlib-be0a6b0dd6b72667a930a8e26bf4ae9e99b311a5.tar nixlib-be0a6b0dd6b72667a930a8e26bf4ae9e99b311a5.tar.gz nixlib-be0a6b0dd6b72667a930a8e26bf4ae9e99b311a5.tar.bz2 nixlib-be0a6b0dd6b72667a930a8e26bf4ae9e99b311a5.tar.lz nixlib-be0a6b0dd6b72667a930a8e26bf4ae9e99b311a5.tar.xz nixlib-be0a6b0dd6b72667a930a8e26bf4ae9e99b311a5.tar.zst nixlib-be0a6b0dd6b72667a930a8e26bf4ae9e99b311a5.zip |
nixos/restic: append PATH in wrappers instead of overwriting
fixes "mount"
Diffstat (limited to 'nixos/modules/services/backup')
-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 e3eb504e0adf..b222dd952d15 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); |