aboutsummaryrefslogtreecommitdiff
path: root/nixos/machine/spt-mox2.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/machine/spt-mox2.nix')
-rw-r--r--nixos/machine/spt-mox2.nix70
1 files changed, 22 insertions, 48 deletions
diff --git a/nixos/machine/spt-mox2.nix b/nixos/machine/spt-mox2.nix
index b504563..32bd9b0 100644
--- a/nixos/machine/spt-mox2.nix
+++ b/nixos/machine/spt-mox2.nix
@@ -6,6 +6,16 @@
}:
with lib; {
config = {
+ cynerd = {
+ wifiAP.spt = {
+ enable = true;
+ qca988x = {
+ interface = "wls1";
+ channel = 7;
+ };
+ };
+ };
+
swapDevices = [
{
device = "/dev/disk/by-partlabel/NixTurrisSwap";
@@ -13,62 +23,26 @@ with lib; {
}
];
- networking.wirelessAP = {
- enable = true;
- environmentFile = "/run/secrets/hostapd.env";
- interfaces = {
- "wls1" = {
- countryCode = "CZ";
- channel = 7;
- hwMode = "g";
- ht_capab = ["LDPC" "HT40+" "SHORT-GI-20" "SHORT-GI-40" "TX-STBC" "RX-STBC1" "MAX-AMSDU-7935" "DSSS_CCK-40"];
- ssid = "TurrisRules";
- bridge = "brlan";
- wpa = 2;
- wpaPassphrase = "@PASS_TURRIS_RULES@";
- #bss = {
- # "wlp1s0host" = {
- # ssid = "KocoviGuest";
- # wpa = true;
- # wpaPassphrase = "@PASS_KOCOVI@";
- # };
- #};
- };
- };
- };
-
networking = {
vlans = {
- "eth0.2" = {
+ "brlan.guest" = {
id = 2;
- interface = "eth0";
+ interface = "brlan";
};
};
bridges = {
- brlan = {
- interfaces = [
- "eth0"
- ];
- };
- brguest = {
- interfaces = [
- "eth0.2"
- ];
- };
- };
- interfaces.brlan = {
- ipv4 = {
- addresses = [
- {
- address = config.cynerd.hosts.spt.mox2;
- prefixLength = 24;
- }
- ];
- };
+ brlan.interfaces = ["eth0"];
+ brguest.interfaces = ["brlan.guest"];
};
+ interfaces.brlan.ipv4.addresses = [
+ {
+ address = config.cynerd.hosts.spt.mox;
+ prefixLength = 24;
+ }
+ ];
defaultGateway = config.cynerd.hosts.spt.omnia;
- nameservers = [config.cynerd.hosts.spt.omnia "1.1.1.1" "8.8.8.8"];
- dhcpcd.allowInterfaces = ["brlan"];
+ nameservers = ["1.1.1.1" "8.8.8.8"];
+ dhcpcd.allowInterfaces = [];
};
};
}