MyNixOS website logo
option

networking.wireguard.interfaces

WireGuard interfaces.

Please note that systemd.network.netdevs has more features and is better maintained. When building new things, it is advised to use that instead.

Declarations
Type
attribute set of (submodule)
Default
{ }
Example
{
  wg0 = {
    ips = [
      "192.168.20.4/24"
    ];
    peers = [
      {
        allowedIPs = [
          "192.168.20.1/32"
        ];
        endpoint = "demo.wireguard.io:12913";
        publicKey = "xTIBA5rboUvnH4htodjb6e697QjLERt1NAB4mZqp8Dg=";
      }
    ];
    privateKey = "yAnz5TF+lXXJte14tji3zlMNq+hd2rYUIgJBgB3fBmk=";
  };
}