wireguard config but not enabled

This commit is contained in:
Noah Masur
2022-06-04 10:29:36 -04:00
parent aa8765b2a2
commit 0fd3956bda
4 changed files with 21 additions and 12 deletions

View File

@ -1,14 +1,18 @@
{ ... }: {
networking.wireguard.interfaces = {
wg0 = {
ips = [ "10.0.0.1/32" "fc00:bbbb:bbbb:bb01::3:7fea/128" ];
privateKeyFile = "/private/wireguard-pk";
peers = [{
publicKey = "ABCDEFABCDEF";
allowedIPs = [ "0.0.0.0/0" "::0/0" ];
endpoint = "10.0.0.1:51820";
persistentKeepalive = 25;
}];
networking.wireguard = {
enable = true;
interfaces = {
wg0 = {
ips = [ "10.66.127.235/32" "fc00:bbbb:bbbb:bb01::3:7fea/128" ];
generatePrivateKeyFile = true;
privateKeyFile = "/private/wireguard/wg0";
peers = [{
publicKey = "cVDIYPzNChIeANp+0jE12kWM5Ga1MbmNErT1Pmaf12A=";
allowedIPs = [ "0.0.0.0/0" "::0/0" ];
endpoint = "89.46.62.197:51820";
persistentKeepalive = 25;
}];
};
};
};
}