diff options
Diffstat (limited to 'hosts/muhammed/wireguard/ahmed.nix')
-rw-r--r-- | hosts/muhammed/wireguard/ahmed.nix | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/hosts/muhammed/wireguard/ahmed.nix b/hosts/muhammed/wireguard/ahmed.nix index 406ff7d..5e20813 100644 --- a/hosts/muhammed/wireguard/ahmed.nix +++ b/hosts/muhammed/wireguard/ahmed.nix @@ -1,4 +1,8 @@ -{metadata, config, ...}: { +{ + metadata, + config, + ... +}: { networking.wg-quick.interfaces.wg0 = { # Use the address assigned for us in `hosts/ahmed/wireguard-vpn/default.nix`. address = ["10.100.0.2"]; @@ -8,14 +12,16 @@ privateKeyFile = config.age.secrets.wireguard-key.path; - peers = [(let - peerInfo = metadata.hosts.ahmed.wireguard; - in { - publicKey = peerInfo.pubkey; - allowedIPs = ["0.0.0.0/0" "::/0"]; - endpoint = "${peerInfo.ipv4Address}:${toString peerInfo.port}"; - persistentKeepalive = 5; # We are a roaming client, they are static. - })]; + peers = [ + (let + peerInfo = metadata.hosts.ahmed.wireguard; + in { + publicKey = peerInfo.pubkey; + allowedIPs = ["0.0.0.0/0" "::/0"]; + endpoint = "${peerInfo.ipv4Address}:${toString peerInfo.port}"; + persistentKeepalive = 5; # We are a roaming client, they are static. + }) + ]; # table = "off"; }; |