diff --git a/ops/nixos/rexxar/default.nix b/ops/nixos/rexxar/default.nix index f771f51ea9..8ee565ab38 100644 --- a/ops/nixos/rexxar/default.nix +++ b/ops/nixos/rexxar/default.nix @@ -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;