mirror of
https://git.gay/xqtc/nixos-config
synced 2024-11-23 10:10:33 +01:00
31 lines
609 B
Nix
31 lines
609 B
Nix
|
{
|
||
|
config,
|
||
|
lib,
|
||
|
inputs,
|
||
|
...
|
||
|
}: {
|
||
|
# networking.nat.enable = true;
|
||
|
# networking.nat.externalInterface = "enp0s31f6";
|
||
|
# networking.nat.internalInterfaces = "wg0";
|
||
|
networking.firewall = {
|
||
|
allowedUDPPorts = [51820];
|
||
|
};
|
||
|
|
||
|
networking.wireguard.interfaces = {
|
||
|
ips = ["2a01:4f8:10a:1aab::2/64"];
|
||
|
|
||
|
listenPort = 51820;
|
||
|
|
||
|
privateKeyFile = "/home/xqtc/wireguard-keys/private";
|
||
|
|
||
|
peers = [
|
||
|
{
|
||
|
#anner
|
||
|
publicKey = "5ar4lh3Ra4TRmUJeeBtPgDvZnAkGssJDUN53y9oa3So=";
|
||
|
allowedIPs = ["2a0f:be01::/48"];
|
||
|
endpoint = "[2a0f:be01::1]:51822";
|
||
|
}
|
||
|
];
|
||
|
};
|
||
|
}
|