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

4
flake.lock generated
View file

@ -347,8 +347,8 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1685290091, "lastModified": 1686226982,
"narHash": "sha256-Shhg4EstYivzF10RuNDUKw3KGQOS5e7S7yHFnWuJQSI=", "narHash": "sha256-jsVFb4XxVdHvCA/OAuJA8tdPVf+jvm/eZLUZS4FoBGY=",
"type": "git", "type": "git",
"url": "file:///root/projects/nixpkgs-test" "url": "file:///root/projects/nixpkgs-test"
}, },

View file

@ -16,12 +16,6 @@ in {
group = "promtail"; group = "promtail";
}; };
#age.secrets.loki-basic-auth-password = {
# generate = "alnum48";
# mode = "440";
# group = "promtail";
#};
services.promtail = { services.promtail = {
enable = true; enable = true;
configuration = { configuration = {

View file

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