aboutsummaryrefslogtreecommitdiff
path: root/nixos/machine/spt-mox2.nix
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2024-01-27 13:20:03 +0100
committerKarel Kočí <cynerd@email.cz>2024-01-27 13:20:03 +0100
commitc1a76b4403edcf5e2a147d68b7bbdf1c33ac95ef (patch)
tree95b00eb500c49c3358b3f736eae9cfe9165f354a /nixos/machine/spt-mox2.nix
parent6b0bc35f83a14ee9f9a34e1af782f1ef4c363d6e (diff)
downloadnixos-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-mox2.nix')
-rw-r--r--nixos/machine/spt-mox2.nix52
1 files changed, 23 insertions, 29 deletions
diff --git a/nixos/machine/spt-mox2.nix b/nixos/machine/spt-mox2.nix
index 4d1a148..cf94798 100644
--- a/nixos/machine/spt-mox2.nix
+++ b/nixos/machine/spt-mox2.nix
@@ -7,45 +7,39 @@
with lib; {
config = {
cynerd = {
+ switch = {
+ enable = true;
+ lanAddress = "${config.cynerd.hosts.spt.mox2}/24";
+ lanGateway = config.cynerd.hosts.spt.omnia;
+ };
wifiAP.spt = {
enable = true;
qca988x = {
interface = "wls1";
- channel = 7;
+ bssids = ["04:f0:21:45:d3:47" "08:f0:21:45:d3:47"];
+ channel = 1;
};
};
};
- swapDevices = [
- {
- device = "/dev/disk/by-partlabel/NixTurrisSwap";
- priority = 1;
- }
- ];
-
networking = {
- vlans = {
- "brlan.guest" = {
- id = 2;
- interface = "brlan";
- };
- };
- bridges = {
- brlan.interfaces = ["eth0"];
- brguest.interfaces = ["brlan.guest"];
+ useNetworkd = true;
+ useDHCP = false;
+ };
+ systemd.network.networks = {
+ "lan-brlan" = {
+ matchConfig.Name = "end0";
+ networkConfig.Bridge = "brlan";
+ bridgeVLANs = [
+ {
+ bridgeVLANConfig = {
+ EgressUntagged = 1;
+ PVID = 1;
+ };
+ }
+ {bridgeVLANConfig.VLAN = 2;}
+ ];
};
- interfaces.brlan.ipv4.addresses = [
- {
- address = config.cynerd.hosts.spt.mox2;
- prefixLength = 24;
- }
- ];
- defaultGateway = config.cynerd.hosts.spt.omnia;
- nameservers = ["1.1.1.1" "8.8.8.8"];
- dhcpcd.allowInterfaces = [];
};
-
- # TODO: ubootTools build is broken!
- firmware.environment.enable = false;
};
}