From b7dd9f396326ab914897900fbaa1e16a46928adf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Wed, 18 Jan 2023 22:54:54 +0100 Subject: nioxos: 5GHz Wi-Fi --- nixos/modules/router.nix | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'nixos/modules') diff --git a/nixos/modules/router.nix b/nixos/modules/router.nix index cd7841e..e149633 100644 --- a/nixos/modules/router.nix +++ b/nixos/modules/router.nix @@ -47,15 +47,14 @@ in { config = mkIf cnf.enable { networking = { - interfaces."${cnf.brlan}" = { - ipv4.addresses = [ - { - address = cnf.lanIP; - prefixLength = cnf.lanPrefix; - } - ]; - }; + interfaces."${cnf.brlan}".ipv4.addresses = [ + { + address = cnf.lanIP; + prefixLength = cnf.lanPrefix; + } + ]; nat = { + enable = true; externalInterface = cnf.wan; internalInterfaces = [cnf.brlan]; }; @@ -68,7 +67,7 @@ in { authoritative = true; interfaces = [cnf.brlan]; extraConfig = '' - option domain-name-servers 1.1.1.1 8.8.8.8; + option domain-name-servers 1.1.1.1, 8.8.8.8; subnet ${ipv4.prefix2ip cnf.lanIP cnf.lanPrefix} netmask ${ipv4.prefix2netmask cnf.lanPrefix} { range ${ ipv4.ipAdd cnf.lanIP cnf.lanPrefix cnf.dynIPStart @@ -83,7 +82,8 @@ in { }; services.dhcpd6 = { - enable = true; + # TODO + enable = false; authoritative = true; interfaces = [cnf.brlan]; extraConfig = '' -- cgit v1.2.3