summaryrefslogtreecommitdiff
path: root/hosts/dishwasher/oxalab.nix
blob: ffe34fa73c3261b44c56991ba58355be650388ef (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
{ config, ... }:
{
  networking.wireguard.enable = true;
  systemd.network = {
    netdevs."oxalab" = {
      netdevConfig = {
        Kind = "wireguard";
        Name = "oxalab";
        Description = "oxa's enterprise network";
      };
      wireguardConfig = {
        PrivateKeyFile = config.sops.secrets."wg/oxalab-seckey".path;
      };
      wireguardPeers = [
        {
          # cirrus
          wireguardPeerConfig = {
          PublicKey = "5nCVC21BL+1r70OGwA4Q6Z/gcPLC3+ZF8sTurdn7N0E=";
          AllowedIPs = [ "10.66.66.0/24" ];
          Endpoint = [ "95.216.166.21:51820" ];
          PersistentKeepalive = 25;
        };
        }
      ];
    };
    networks."oxalab" = {
      matchConfig.Name = "oxalab";
      networkConfig = {
        Address = "10.66.66.100/24";
      };
    };
  };
}