rexxar: don't set the Endpoint in systemd-networkd unless there is one
This commit is contained in:
parent
bd83a33608
commit
73cbfc1a40
1 changed files with 3 additions and 2 deletions
|
@ -109,14 +109,15 @@
|
|||
ListenPort = listenPort;
|
||||
PrivateKeyFile = privateKey;
|
||||
};
|
||||
wireguardPeers = [{
|
||||
wireguardPeers = [(lib.mkMerge [{
|
||||
PublicKey = publicKey;
|
||||
AllowedIPs = [
|
||||
"0.0.0.0/0"
|
||||
"::/0"
|
||||
];
|
||||
} (lib.mkIf (endpoint != null) {
|
||||
Endpoint = endpoint;
|
||||
}];
|
||||
})])];
|
||||
};
|
||||
swannWireguard = args: wireguard (args // {
|
||||
privateKey = config.my.vault.secrets.wg-swann-private.path;
|
||||
|
|
Loading…
Reference in a new issue