aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/configuration/server/wireguard/hyperion.nix
blob: 2a20f6ee553384899842b2f8b1fe6f4926dd4dba (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
{ config, ... }:

let listenPort = 51820;
in
{
  networking.firewall.allowedTCPPorts = [ listenPort ];
  
  networking.wireguard.interfaces."intranet" = {
    ips = [ "10.13.12.1" ];
    inherit listenPort;
    privateKeyFile = "/var/lib/wireguard/keys/private";

    peers = [
      { publicKey = "NHMpnZW6h/MwxWcjztpwH5NN44jS9lB1b5T5jby1i1A=";
        allowedIPs = [ "10.13.12.2/32" ]; }
      { publicKey = "U/EmC6uMGqrLOd+lqfquDcUShPHgoulN35Dan6RAqyU=";
        allowedIPs = [ "10.13.12.3/32" ]; }
      { publicKey = "yh8gU4otkndmSsVBuaPMxxFHem45FE3POvSAWi8LEik=";
        allowedIPs = [ "10.13.12.4/32" ]; }
      { publicKey = "cPvj0SPITg1twz3DprtQgehJDOAhOL/hnXlB5ZS6Fi4=";
        endpoint = "85.119.82.108:51820";
        allowedIPs = [ "10.172.171.0/24" ]; }
      # { publicKey = "oQZ3fcb9LsnQj8sDYLHf1+hodnW4XEhsM0rNBgHROz8=";
      #   allowedIPs = [ "10.172.171.2/32" ]; }
    ];
  };
}