From a03996d7a11edc84e231f513ef134f9f58d44ccf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Thu, 18 Aug 2022 08:43:38 +0200 Subject: nixos: work little bit on routers --- nixos/machine/spt-omnia.nix | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) (limited to 'nixos/machine/spt-omnia.nix') diff --git a/nixos/machine/spt-omnia.nix b/nixos/machine/spt-omnia.nix index 4cb80c4..d2c4a96 100644 --- a/nixos/machine/spt-omnia.nix +++ b/nixos/machine/spt-omnia.nix @@ -9,17 +9,40 @@ with lib; openvpn.oldpersonal = true; }; + networking = { + # TODO we need vlan filtering to filter out guest network + bridges = { + brlan = { + interfaces = [ + "lan0" "lan1" "lan2" "lan3" "lan4" + ]; + }; + #brguest = { + # interfaces = [ + # "brlan.2" #"mlan0host" "wlp1s0host" + # ]; + #}; + }; + interfaces.brlan = { + ipv4 = { + addresses = [{ + address = config.cynerd.hosts.spt.omnia; + prefixLength = 24; + }]; + }; + }; + nameservers = [ "127.0.0.1" "1.1.1.1" "8.8.8.8" ]; + dhcpcd.allowInterfaces = [ "eth2" ]; + }; + services.syncthing = { enable = true; - #user = mkDefault "cynerd"; - #group = mkDefault "cynerd"; openDefaultPorts = true; overrideDevices = false; overrideFolders = false; dataDir = "/data"; - configDir = "/srv/syncthing"; }; }; -- cgit v1.2.3