diff options
author | pennae <github@quasiparticle.net> | 2023-02-13 10:34:28 +0100 |
---|---|---|
committer | pennae <82953136+pennae@users.noreply.github.com> | 2023-02-16 11:56:12 +0100 |
commit | 047bd73c5e05e8f60abb0ea2a3b22c845404f9cd (patch) | |
tree | df1416a80c219fb89f5b0e8e54e975050640ded2 /nixos/tests | |
parent | f080d59315e4f0eaf45ef7b3aa8136c21c549fee (diff) |
nixos/wireguard: make publicKeys singleLineStrs
using readFile instead of fileContents (or using indented strings) can leave a trailing newline that causes build errors in systemd units and has previously caused runtime errors in wireguard scripts. use singleLineStr to strip a trailing newline if it exists, and to fail if more than one is present.
Diffstat (limited to 'nixos/tests')
-rw-r--r-- | nixos/tests/wireguard/snakeoil-keys.nix | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/nixos/tests/wireguard/snakeoil-keys.nix b/nixos/tests/wireguard/snakeoil-keys.nix index 55ad582d40595..c979f0e0c8a96 100644 --- a/nixos/tests/wireguard/snakeoil-keys.nix +++ b/nixos/tests/wireguard/snakeoil-keys.nix @@ -6,6 +6,7 @@ peer1 = { privateKey = "uO8JVo/sanx2DOM0L9GUEtzKZ82RGkRnYgpaYc7iXmg="; - publicKey = "Ks9yRJIi/0vYgRmn14mIOQRwkcUGBujYINbMpik2SBI="; + # readFile'd keys may have trailing newlines, emulate this + publicKey = "Ks9yRJIi/0vYgRmn14mIOQRwkcUGBujYINbMpik2SBI=\n"; }; } |