diff options
author | Karel Kočí <cynerd@email.cz> | 2024-01-27 13:20:03 +0100 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2024-01-27 13:20:03 +0100 |
commit | c1a76b4403edcf5e2a147d68b7bbdf1c33ac95ef (patch) | |
tree | 95b00eb500c49c3358b3f736eae9cfe9165f354a /nixos/machine/spt-omniax.nix | |
parent | 6b0bc35f83a14ee9f9a34e1af782f1ef4c363d6e (diff) | |
download | nixos-personal-c1a76b4403edcf5e2a147d68b7bbdf1c33ac95ef.tar.gz nixos-personal-c1a76b4403edcf5e2a147d68b7bbdf1c33ac95ef.tar.bz2 nixos-personal-c1a76b4403edcf5e2a147d68b7bbdf1c33ac95ef.zip |
Rework routers to use systemd-networkd
Diffstat (limited to 'nixos/machine/spt-omniax.nix')
-rw-r--r-- | nixos/machine/spt-omniax.nix | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/nixos/machine/spt-omniax.nix b/nixos/machine/spt-omniax.nix new file mode 100644 index 0000000..9bdc3d3 --- /dev/null +++ b/nixos/machine/spt-omniax.nix @@ -0,0 +1,57 @@ +{ + config, + lib, + pkgs, + ... +}: +with lib; { + config = { + cynerd = { + router = { + enable = true; + wan = "end2"; + lanIP = "192.168.2.1"; + }; + wifiAP.spt = { + enable = true; + ar9287.interface = "wlp3s0"; + qca988x.interface = "wlp2s0"; + }; + monitoring.speedtest = true; + }; + + networking.useDHCP = false; + systemd.network = { + networks = { + "end2" = { + matchConfig.Name = "end2"; + networkConfig = { + BindCarrier = "end2"; + DHCP = "yes"; + IPv6AcceptRA = "yes"; + DHCPPrefixDelegation = "yes"; + }; + dhcpPrefixDelegationConfig = { + UplinkInterface = ":self"; + SubnetId = 0; + Announce = "no"; + }; + linkConfig.RequiredForOnline = "routable"; + }; + "lan-brlan" = { + matchConfig.Name = "lan*"; + networkConfig.Bridge = "brlan"; + bridgeVLANs = [ + { + bridgeVLANConfig = { + EgressUntagged = 1; + PVID = 1; + }; + } + {bridgeVLANConfig.VLAN = 2;} + ]; + }; + }; + }; + }; +} |