summaryrefslogtreecommitdiff
path: root/hosts/toaster/network/dumpdvb.nix
blob: 84074bd54b5979e2da8b485250e736548c357fe7 (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
{ config, ... }: {
  systemd.network = {
    # Wireguard
    # Dump-dvb
    netdevs."30-wg-dumpdvb" = {
      netdevConfig = {
        Kind = "wireguard";
        Name = "wg-dumpdvb";
        Description = "dvb.solutions enterprise network";
      };
      wireguardConfig = {
        PrivateKeyFile = config.sops.secrets."wg/dvb".path;
      };
      wireguardPeers = [
        {
          PublicKey = "WDvCObJ0WgCCZ0ORV2q4sdXblBd8pOPZBmeWr97yphY=";
          Endpoint = "academicstrokes.com:51820";
          AllowedIPs = [ "10.13.37.0/24" ];
          PersistentKeepalive = 25;
        }
      ];
    };
    networks."30-wg-dumpdvb" = {
      matchConfig.Name = "wg-dumpdvb";
      networkConfig = {
        Address = "10.13.37.3/24";
        IPv6AcceptRA = true;
      };
      routes = [
        { Gateway = "10.13.37.1"; Destination = "10.13.37.0/24";  }
      ];
    };
  };
}