aboutsummaryrefslogtreecommitdiff
path: root/nixos/machine/spt-mox2.nix
blob: cf94798b9f9eada7f0cff34b02e4b2d4af666096 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
{
  config,
  lib,
  pkgs,
  ...
}:
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";
          bssids = ["04:f0:21:45:d3:47" "08:f0:21:45:d3:47"];
          channel = 1;
        };
      };
    };

    networking = {
      useNetworkd = true;
      useDHCP = false;
    };
    systemd.network.networks = {
      "lan-brlan" = {
        matchConfig.Name = "end0";
        networkConfig.Bridge = "brlan";
        bridgeVLANs = [
          {
            bridgeVLANConfig = {
              EgressUntagged = 1;
              PVID = 1;
            };
          }
          {bridgeVLANConfig.VLAN = 2;}
        ];
      };
    };
  };
}