mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-10 19:55:41 +03:00
nixos/wireguard-networkd: only set PresharedKey credential when given a file
This patch fixes an oversight in the initial implementation
of using systemd credentials in 6bc8dcc630
that would cause a warning to be logged about a missing credential
when presharedKeyFile wasn't set.
This commit is contained in:
parent
5ea8221772
commit
e7e42de5a7
1 changed files with 2 additions and 1 deletions
|
@ -61,7 +61,8 @@ let
|
|||
interfaceName: peer:
|
||||
removeNulls {
|
||||
PublicKey = peer.publicKey;
|
||||
PresharedKey = "@${presharedKeyCredential interfaceName peer}";
|
||||
PresharedKey =
|
||||
if peer.presharedKeyFile == null then null else "@${presharedKeyCredential interfaceName peer}";
|
||||
AllowedIPs = peer.allowedIPs;
|
||||
Endpoint = peer.endpoint;
|
||||
PersistentKeepalive = peer.persistentKeepalive;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue