aboutsummaryrefslogtreecommitdiff
path: root/modules/networks/evilvpn.nix
blob: 95e981a0ff19c78adb26ba9b49fc3c2cda9f1036 (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
{ config, lib, ... }:
{
  systemd.network = {
    netdevs."90-evilvpn" = {
      enable = lib.mkDefault false;
      netdevConfig = {
        Kind = "wireguard";
        Name = "wg0";
      };

      wireguardConfig = {
        PrivateKeyFile = "/etc/wireguard/${config.networking.hostName}.key";
        RouteTable = "main";
      };

      wireguardPeers = [
        {
          AllowedIPs = [ "10.6.6.0/24" ];
          Endpoint = "www.eviltransgenders.club:51820";
          PersistentKeepalive = 25;
          PublicKey = "ChnzJG0HJcgk3OhgTzoPZ9EOyhuCH1EAknaQ9VF7N0I=";
        }
      ];
    };

    networks."90-evilvpn" = {
      dns = [ "10.6.6.2" ];
      matchConfig.Name = "wg0";
    };
  };
}