From 96f31a0933c81840d6c9993cbd48435f7e7dbfac Mon Sep 17 00:00:00 2001 From: sinanmohd Date: Sat, 29 Jun 2024 10:17:21 +0530 Subject: kay/wireguard: clean up --- os/kay/modules/wireguard.nix | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'os/kay/modules') diff --git a/os/kay/modules/wireguard.nix b/os/kay/modules/wireguard.nix index 82eb96f..2ee41b6 100644 --- a/os/kay/modules/wireguard.nix +++ b/os/kay/modules/wireguard.nix @@ -1,13 +1,10 @@ -{ config, ... }: - -let +{ config, ... }: let wgInterface = "wg"; wanInterface = "ppp0"; subnet = "10.0.1.0"; prefix = 24; port = 51820; -in -{ +in { sops.secrets."misc/wireguard" = {}; networking = { @@ -19,7 +16,10 @@ in firewall = { allowedUDPPorts = [ port ]; extraCommands = '' - iptables -t nat -I POSTROUTING 1 -s ${subnet}/${toString prefix} -o ${wanInterface} -j MASQUERADE + iptables -t nat -I POSTROUTING 1 \ + -s ${subnet}/${toString prefix} \ + -o ${wanInterface} \ + -j MASQUERADE ''; }; -- cgit v1.2.3