summaryrefslogtreecommitdiff
path: root/modules/wireguard.nix
blob: 9a01f744b384a7d0708a2a9588f327542c5c36ea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
{ config, ... }:

{
  networking.wg-quick.interfaces = {
    wg-zw = {
      privateKeyFile="/etc/wg/zw-wg-key";
      address = ["172.20.76.226" ];
      dns = [ "172.20.73.8" ];
      peers = [
        {
          publicKey = "PG2VD0EB+Oi+U5/uVMUdO5MFzn59fAck6hz8GUyLMRo=";
          endpoint = "81.201.149.152:1337";
          allowedIPs = [ "172.20.72.0/21" "172.22.99.0/24" ];
        }
      ];
    };
    wg-dvb = {
      privateKeyFile="/etc/wg/wg-dvb";
      address = [ "10.13.37.3/32" ];

      peers = [
        {
          publicKey = "WDvCObJ0WgCCZ0ORV2q4sdXblBd8pOPZBmeWr97yphY=";
          allowedIPs = [ "10.13.37.0/24" ];
          endpoint = "academicstrokes.com:51820";
          persistentKeepalive = 25;
        }
      ];
    };

    mlwd-nl = {
      privateKeyFile = "/etc/wg/mlvd";
      address = [ "10.65.79.164/32" "fc00:bbbb:bbbb:bb01::2:4fa3/128" ];
      dns = [ "193.138.218.74" ];

      peers = [ {
        publicKey = "StMPmol1+QQQQCJyAkm7t+l/QYTKe5CzXUhw0I6VX14=";
        allowedIPs = [ "0.0.0.0/0" "::0/0" ];
        endpoint = "92.60.40.194:51820";
      }];
    };
  };
}