From f6885105e954437cec44543e55870ee9c3d4a1d8 Mon Sep 17 00:00:00 2001 From: hotburger <33610620+hotburger@users.noreply.github.com> Date: Mon, 31 Mar 2025 13:13:48 -0700 Subject: [PATCH] nixos/restic: escape settings in wrapper script --- nixos/modules/services/backup/restic.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nixos/modules/services/backup/restic.nix b/nixos/modules/services/backup/restic.nix index ce8bcc3994b8..69df4f60d8de 100644 --- a/nixos/modules/services/backup/restic.nix +++ b/nixos/modules/services/backup/restic.nix @@ -465,8 +465,8 @@ in # set same environment variables as the systemd service ${lib.pipe config.systemd.services."restic-backups-${name}".environment [ (lib.filterAttrs (n: v: v != null && n != "PATH")) - (lib.mapAttrsToList (n: v: "${n}=${v}")) - (lib.concatStringsSep "\n") + (lib.mapAttrs (_: v: "${v}")) + (lib.toShellVars) ]} PATH=${config.systemd.services."restic-backups-${name}".environment.PATH}:$PATH