diff options
-rw-r--r-- | modules/apps/filebackup.nix | 4 | ||||
-rw-r--r-- | modules/apps/mysqlbackup.nix | 4 | ||||
-rw-r--r-- | modules/apps/pgbackup.nix | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/modules/apps/filebackup.nix b/modules/apps/filebackup.nix index 55412a1..e6760bd 100644 --- a/modules/apps/filebackup.nix +++ b/modules/apps/filebackup.nix @@ -80,8 +80,8 @@ let mv "$tarball".tmp "$tarball" ${optionalString (gpgPubKeys != []) '' - recipient=( $(${gpg} --homedir '${privateDir}/gnupg' -k --with-colons --fast-list-mode | \ - ${pkgs.gawk}/bin/awk -F: '/^pub/{print $5}') ) + mapfile -t recipient < <(${gpg} --homedir '${privateDir}/gnupg' -k --with-colons --fast-list-mode | \ + ${pkgs.gawk}/bin/awk -F: '/^pub/{print $5}') r=( "''${recipient[@]/#/-r}" ) ${gpg} --homedir '${privateDir}/gnupg' --batch --no-tty --yes \ "''${r[@]}" --trust-model always \ diff --git a/modules/apps/mysqlbackup.nix b/modules/apps/mysqlbackup.nix index 8e87da6..96e5f08 100644 --- a/modules/apps/mysqlbackup.nix +++ b/modules/apps/mysqlbackup.nix @@ -182,8 +182,8 @@ let mv "$dump".tmp "$dump" ${optionalString (gpgPubKeys != []) '' - recipient=( $(${gpg} --homedir '${privateDir}/gnupg' -k --with-colons --fast-list-mode | \ - ${pkgs.gawk}/bin/awk -F: '/^pub/{print $5}') ) + mapfile -t recipient < <(${gpg} --homedir '${privateDir}/gnupg' -k --with-colons --fast-list-mode | \ + ${pkgs.gawk}/bin/awk -F: '/^pub/{print $5}') r=( "''${recipient[@]/#/-r}" ) ${gpg} --homedir '${privateDir}/gnupg' --batch --no-tty --yes \ "''${r[@]}" --trust-model always \ diff --git a/modules/apps/pgbackup.nix b/modules/apps/pgbackup.nix index 2cde338..8eb0726 100644 --- a/modules/apps/pgbackup.nix +++ b/modules/apps/pgbackup.nix @@ -130,8 +130,8 @@ let } ${optionalString (gpgPubKeys != []) '' - recipient=( $(${gpg} --homedir '${privateDir}/gnupg' -k --with-colons --fast-list-mode | \ - ${pkgs.gawk}/bin/awk -F: '/^pub/{print $5}') ) + mapfile -t recipient < <(${gpg} --homedir '${privateDir}/gnupg' -k --with-colons --fast-list-mode | \ + ${pkgs.gawk}/bin/awk -F: '/^pub/{print $5}') r=( "''${recipient[@]/#/-r}" ) ${gpg} --homedir '${privateDir}/gnupg' --batch --no-tty --yes \ "''${r[@]}" --trust-model always \ |