diff options
author | sinanmohd <sinan@sinanmohd.com> | 2025-06-10 15:55:54 +0530 |
---|---|---|
committer | sinanmohd <sinan@sinanmohd.com> | 2025-06-10 22:55:04 +0530 |
commit | a41037ef644dbacb3d577933fb3d93c210439b38 (patch) | |
tree | a262750bcb1357785ad8cb68b232a5ca242ee671 /os/kay/modules/router.nix | |
parent | cfccbd1e4026d568e23a47c060ae3ae042cceb4c (diff) |
chore(repo): reformat with nixfmt-rfc-style
Diffstat (limited to 'os/kay/modules/router.nix')
-rw-r--r-- | os/kay/modules/router.nix | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/os/kay/modules/router.nix b/os/kay/modules/router.nix index bb8cd3b..7280401 100644 --- a/os/kay/modules/router.nix +++ b/os/kay/modules/router.nix @@ -1,4 +1,5 @@ -{ ... }: let +{ ... }: +let wanInterface = "ppp0"; gponInterface = "enp3s0"; @@ -15,7 +16,8 @@ wapMac = "40:86:cb:d7:40:49"; wapIp = "192.168.43.2"; -in { +in +{ imports = [ ./wireguard.nix ./iperf3.nix @@ -30,17 +32,24 @@ in { internalInterfaces = [ bridgeInterface ]; }; interfaces = { - ${bridgeInterface}.ipv4.addresses = [{ + ${bridgeInterface}.ipv4.addresses = [ + { address = host; - prefixLength = prefix; - }]; - ${gponInterface}.ipv4.addresses = [{ + prefixLength = prefix; + } + ]; + ${gponInterface}.ipv4.addresses = [ + { address = gponHost; - prefixLength = gponPrefix; - }]; + prefixLength = gponPrefix; + } + ]; }; firewall = { - allowedUDPPorts = [ 53 67 ]; + allowedUDPPorts = [ + 53 + 67 + ]; allowedTCPPorts = [ 53 ]; extraCommands = '' iptables -t mangle -A FORWARD -p tcp --tcp-flags SYN,RST SYN \ @@ -57,7 +66,7 @@ in { services.dnsmasq.settings = { dhcp-range = [ "${leaseRangeStart},${leaseRangeEnd}" ]; - dhcp-host= "${wapMac},${wapIp}"; + dhcp-host = "${wapMac},${wapIp}"; interface = [ bridgeInterface ]; }; |