summaryrefslogtreecommitdiff
path: root/config/networking.nix
blob: 14333fe4d91425a77eb7bcfb60539697ec47ca98 (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
{...}: {
  personal.networking = {
    enable = true;
    firewall.http = true;
    ssh.enable = true;
  };

  networking = {
    hostName = "hermes";
    domain = "aristote.fr";

    useDHCP = false;
    interfaces.ens3.ipv4.addresses = [
      {
        address = "93.95.228.53";
        prefixLength = 24;
      }
    ];
    defaultGateway = "93.95.228.1";
    nameservers = ["93.95.224.28" "93.95.224.29"];

    firewall.allowedUDPPorts = [51820];
    wireguard = {
      enable = true;
      interfaces.talaria = {
        ips = ["10.13.42.1/24"];
        listenPort = 51820;
        privateKeyFile = "/etc/wireguard/talaria.key";
        peers = [
          {
            publicKey = "RrRb7eFxyfOOM99pJyBJ9fOIaZeEllHa8kQheN99dFE=";
            allowedIPs = ["10.13.42.2"];
          }
        ];
      };
    };
  };
}