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;
|
ListenPort = listenPort;
|
||||||
PrivateKeyFile = privateKey;
|
PrivateKeyFile = privateKey;
|
||||||
};
|
};
|
||||||
wireguardPeers = [{
|
wireguardPeers = [(lib.mkMerge [{
|
||||||
PublicKey = publicKey;
|
PublicKey = publicKey;
|
||||||
AllowedIPs = [
|
AllowedIPs = [
|
||||||
"0.0.0.0/0"
|
"0.0.0.0/0"
|
||||||
"::/0"
|
"::/0"
|
||||||
];
|
];
|
||||||
|
} (lib.mkIf (endpoint != null) {
|
||||||
Endpoint = endpoint;
|
Endpoint = endpoint;
|
||||||
}];
|
})])];
|
||||||
};
|
};
|
||||||
swannWireguard = args: wireguard (args // {
|
swannWireguard = args: wireguard (args // {
|
||||||
privateKey = config.my.vault.secrets.wg-swann-private.path;
|
privateKey = config.my.vault.secrets.wg-swann-private.path;
|
||||||
|
|
Loading…
Reference in a new issue