fix: wireguard generator pipe issue

This commit is contained in:
oddlama 2023-06-10 02:00:08 +02:00
parent e61c82ebfc
commit 4abefb0811
No known key found for this signature in database
GPG key ID: 14EFE510775FE39A
3 changed files with 5 additions and 11 deletions

View file

@ -171,9 +171,9 @@
file,
...
}: ''
${pkgs.wireguard-tools}/bin/wg genkey \
| tee /dev/stdout \
| ${pkgs.wireguard-tools}/bin/wg pubkey > ${lib.escapeShellArg (lib.removeSuffix ".age" file + ".pub")}
priv=$(${pkgs.wireguard-tools}/bin/wg genkey)
${pkgs.wireguard-tools}/bin/wg pubkey <<< "$priv" > ${lib.escapeShellArg (lib.removeSuffix ".age" file + ".pub")}
echo "$priv"
'';
};
};