aboutsummaryrefslogtreecommitdiff
path: root/modules/wireguard/roaming.nix
blob: 0b68fe2d0cc612c97935f6d4a4bf2b7cbdcfe2d8 (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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
{ config, pkgs, lib, ... }:

{
  config = lib.mkIf config.wireguard.enable {
    networking.wireguard.interfaces.wg0.peers = lib.mkIf config.wireguard.roaming [
      { # audron computer
        publicKey = "okZQ5cMSu4+M3IKp1yIBuknmAKEzJLKe8tpVeY46phU=";
        allowedIPs = [
          "10.10.0.10/32"
          "2a0f:9400:8020:beef::10/128"
          "fd15:3d8c:d429:beef::10/128"
        ];
      }
      { # audron fritzbox
        publicKey = "PO8NxZynL76xsWPi+ApgVryEJBdxOj9o+bscWXh71Vw=";
        presharedKey = "m/xbu5KWmIdgyushQzauYzW4QLSloLQ26nIjfzZgpdk=";
        endpoint = "f0fk2o183tadohu6.myfritz.net:53984";
        persistentKeepalive = 25;
        allowedIPs = [
          "192.168.144.0/24"
        ];
      }
      { # audron phone
        publicKey = "LDzzGWlBmy9FQ/+bNAaLM2TmS8OR291uVTntwmb/gmM=";
        allowedIPs = [
          "10.10.0.15/32"
          "2a0f:9400:8020:beef::15/128"
          "fd15:3d8c:d429:beef::15/128"
        ];
      }
      { # d3fus computer
        publicKey = "CoMGgzL31yb0ozA17OuF0IDpkV2dnJ7j74itaQb0k1U=";
        allowedIPs = [
          "10.10.0.20/32"
          "2a0f:9400:8020:beef::20/128"
          "fd15:3d8c:d429:beef::20/128"
        ];
      }
      { # d3fus phone
        publicKey = "OEi+MTdy8oMWhkyC5NKHl6ztk92o4gYkgCTt5EMN5i4=";
        allowedIPs = [
          "10.10.0.22/32"
          "2a0f:9400:8020:beef::22/128"
          "fd15:3d8c:d429:beef::22/128"
        ];
      }
      { # d3fus fritzbox
        publicKey = "F81JqOjPIEdgJoznvDyp04JJ9nvT1XvkLX3KWeW6Yi4=";
        presharedKey = "MeWlA+udiJEX5c+GMnZs3YT8GmyBbVmAQiGje/1Ymfw=";
        endpoint = "awvkepyheen2ctg0.myfritz.net:53984";
        persistentKeepalive = 25;
        allowedIPs = [
          "192.168.178.0/24"
        ];
      }
    ];
  };
}