From e6f0c99920fcd1b8ce19490d401d62543079b5a8 Mon Sep 17 00:00:00 2001 From: Fabian Hauser Date: Fri, 24 Jul 2020 14:30:32 +0200 Subject: [PATCH] Switch calanda configuration to new router scheme --- host/calanda.nix | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/host/calanda.nix b/host/calanda.nix index b4f9f67..f952129 100644 --- a/host/calanda.nix +++ b/host/calanda.nix @@ -7,8 +7,11 @@ { imports = [ ../hardware/apu.nix + ../hardware/wle200nx.nix ../role/base - # ../role/router.nix #TODO + ../role/router + ../role/router-dns + ../role/router-wireless-ap ]; fileSystems."/" = { @@ -20,6 +23,30 @@ swapDevices = [{ device = "/dev/disk/by-uuid/b5104a7c-4a4a-4048-a9f8-44ddb0082632"; }]; + services.router = { + enable = true; + wanInterface = "enp4s0"; + wirelessInterfaces = [ "wlp5s0" ]; + lanInterfaces = [ "enp2s0" ]; + internalRouterIP = "10.2.1.1"; + dhcp = { + enable = true; + localDomain = "ilanz.fh2.ch"; + dhcpRange = "10.1.1.2,10.1.1.249"; + }; + recursiveDns = { + enable = true; + networkIdIp = "10.1.1.0"; + }; + wireless = { + enable = true; + wleInterface24Ghz = "wlp5s0"; + #wleInterface5Ghz = "wlp5s0"; + ssid = "hauser"; + passphrase = "mifatielma"; + }; + }; + # Use the GRUB 2 boot loader. boot.loader.grub.enable = true; boot.loader.grub.version = 2;