aboutsummaryrefslogtreecommitdiff
path: root/nixos/routers
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2023-02-20 10:44:47 +0100
committerKarel Kočí <cynerd@email.cz>2023-02-20 10:44:47 +0100
commita92e932bb4c49fe304b1ee7ebdfafd47b51ba330 (patch)
tree31cb165ab2fbafbab37bd6bca362431e3e6348b3 /nixos/routers
parentc9b0b25abe8f77d1a84bdba51d4ce407b293fa2c (diff)
downloadnixos-personal-a92e932bb4c49fe304b1ee7ebdfafd47b51ba330.tar.gz
nixos-personal-a92e932bb4c49fe304b1ee7ebdfafd47b51ba330.tar.bz2
nixos-personal-a92e932bb4c49fe304b1ee7ebdfafd47b51ba330.zip
nixos/routers: use bridges instead of hostapd's bridge
Diffstat (limited to 'nixos/routers')
-rw-r--r--nixos/routers/wifi-adm.nix16
-rw-r--r--nixos/routers/wifi-spt.nix13
2 files changed, 22 insertions, 7 deletions
diff --git a/nixos/routers/wifi-adm.nix b/nixos/routers/wifi-adm.nix
index f77d9ad..f50e3f3 100644
--- a/nixos/routers/wifi-adm.nix
+++ b/nixos/routers/wifi-adm.nix
@@ -85,13 +85,15 @@ in {
cnf.ar9287.interface
cnf.qca988x.interface
];
- brguest.interfaces = (optionals (cnf.ar9287.interface != null) [
- "${cnf.ar9287.interface}.nela"
- "${cnf.ar9287.interface}.milan"
- ]) ++ (optionals (cnf.qca988x.interface != null) [
- "${cnf.qca988x.interface}.nela"
- "${cnf.qca988x.interface}.milan"
- ]);
+ brguest.interfaces =
+ (optionals (cnf.ar9287.interface != null) [
+ "${cnf.ar9287.interface}.nela"
+ "${cnf.ar9287.interface}.milan"
+ ])
+ ++ (optionals (cnf.qca988x.interface != null) [
+ "${cnf.qca988x.interface}.nela"
+ "${cnf.qca988x.interface}.milan"
+ ]);
};
};
}
diff --git a/nixos/routers/wifi-spt.nix b/nixos/routers/wifi-spt.nix
index 39740a1..3d70e18 100644
--- a/nixos/routers/wifi-spt.nix
+++ b/nixos/routers/wifi-spt.nix
@@ -72,5 +72,18 @@ in {
};
});
};
+ networking.bridges = {
+ brlan.interfaces = filter (v: v != null) [
+ cnf.ar9287.interface
+ cnf.qca988x.interface
+ ];
+ brguest.interfaces =
+ (optionals (cnf.ar9287.interface != null) [
+ "${cnf.ar9287.interface}.guest"
+ ])
+ ++ (optionals (cnf.qca988x.interface != null) [
+ "${cnf.qca988x.interface}.guest"
+ ]);
+ };
};
}