Skip to content

Instantly share code, notes, and snippets.

@stigtsp
Last active October 24, 2019 12:45
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stigtsp/4f7bfc8e72c7b6b819de0caff255ae71 to your computer and use it in GitHub Desktop.
Save stigtsp/4f7bfc8e72c7b6b819de0caff255ae71 to your computer and use it in GitHub Desktop.
{ stdenv, pkgs, lib, ... }:
{
# IPv6 is supported, but this example is for IPv4
networking.wg-quick.interfaces = {
wg0 = {
address = [ "10.7.0.1/32" ];
peers = [
{
publicKey = "ABCABCABC";
allowedIPs = [ "0.0.0.0/0" ];
endpoint = "100.0.0.1:51820";
}
];
privateKeyFile = "/private/wireguard-private-key";
};
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment