summaryrefslogtreecommitdiff
path: root/nixos/hosts/box/components
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/hosts/box/components')
-rw-r--r--nixos/hosts/box/components/wireguard.nix17
1 files changed, 17 insertions, 0 deletions
diff --git a/nixos/hosts/box/components/wireguard.nix b/nixos/hosts/box/components/wireguard.nix
new file mode 100644
index 0000000..37db0a1
--- /dev/null
+++ b/nixos/hosts/box/components/wireguard.nix
@@ -0,0 +1,17 @@
+{
+ networking.firewall.allowedUDPPorts = [ 51820 ];
+
+ networking.wireguard.interfaces.wg0 = {
+ ips = [ "10.0.0.2/24" ];
+ privateKeyFile = "/var/lib/wireguard/privatekey";
+
+ peers = [
+ {
+ publicKey = "P2LPLBq/6qXE5Mmv8DJUviU89Yu5s7vysbyWncnZchY=";
+ allowedIPs = [ "10.0.0.0/24" ];
+ endpoint = "5.231.118.254:51820";
+ persistentKeepalive = 25;
+ }
+ ];
+ };
+}