diff options
author | sinanmohd <sinan@sinanmohd.com> | 2024-06-29 10:17:21 +0530 |
---|---|---|
committer | sinanmohd <sinan@sinanmohd.com> | 2024-06-29 10:18:08 +0530 |
commit | 96f31a0933c81840d6c9993cbd48435f7e7dbfac (patch) | |
tree | d6a17bf4fe814ada2f0b2fe6f65bd50dee0a665a /os | |
parent | 67133cfc011ff2cd2bb5c7aea6c5ebb76ace2e74 (diff) |
kay/wireguard: clean up
Diffstat (limited to 'os')
-rw-r--r-- | os/kay/modules/wireguard.nix | 12 |
1 files changed, 6 insertions, 6 deletions
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 ''; }; |