aboutsummaryrefslogtreecommitdiff
path: root/hosts/herra/network.nix
blob: 06b68adb5cd5a76c2fababbda313862516ebbbe7 (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
{pkgs, ...}: {
  environment.systemPackages = with pkgs; [
    libimobiledevice
  ];
  services.usbmuxd.enable = true;

  networking.wg-quick.interfaces.wg0 = {
    address = [
      "10.9.8.5/32"
      "fd42:42:42::5/128"
    ];

    privateKeyFile = "/run/secrets/wg.key";

    dns = ["1.1.1.1"];

    peers = [
      {
        publicKey = "RflmIMDsWE+APNhVIxlziY9QAfHGLq3k2xQptTFSAWs=";
        presharedKeyFile = "/run/secrets/wg.psk";
        endpoint = "89.24.133.226:19100";
        allowedIPs = [
          "0.0.0.0/0"
          "::/0"
        ];
      }
    ];
  };
}