summaryrefslogtreecommitdiff
path: root/systems/odino/networking.nix
blob: 11490ad4977612454576be1605bfd7ed3fae8bb8 (plain) (blame)
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
{lib, ...}: {
  networking = {
    hostName = "odino";
    useDHCP = lib.mkDefault true;

    nameservers = [ "208.67.222.222" "208.67.220.220" ];

    firewall = {
      enable = true;

      allowedTCPPorts = [ 22 ];
      allowedUDPPorts = [ 51820 ];
    };

    networkmanager.enable = true;

    wg-quick.interfaces."home" = {
      privateKeyFile = "/home/leo/.wireguard/home";
      address = [ "10.69.0.2/24" ];

      peers = [
        {
          publicKey = "629xLQgbpcfGJotfD79p3dNbpiwmp2FQtkUMd/S+M2M=";
          allowedIPs = [ "10.69.0.0/24" ];
          endpoint = "leoflo.me:51820";
          persistentKeepalive = 25;
        }
      ];
    };
  };
}