summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcaley <195605706+cqley@users.noreply.github.com>2026-07-25 03:02:09 +0200
committerGitHub <noreply@github.com>2026-07-25 03:02:09 +0200
commit35ee492fd5b3f4e0d1c09aa22abdbfcb0ecee1e5 (patch)
tree77bb5933ffba7afd9536cb9ec5c3218a9e2cfd36
parentb301ea6f10567861c48987fed5cfebb85249eb54 (diff)
Add WireGuard configuration for wg0 interface
-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;
+ }
+ ];
+ };
+}