Last active
October 24, 2019 12:45
-
-
Save stigtsp/4f7bfc8e72c7b6b819de0caff255ae71 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ 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