aboutsummaryrefslogtreecommitdiff
path: root/nixos/machine/adm-omnia2.nix
blob: 2573372d73e3ce2e94f5585e63b29c6087bc4bc2 (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
46
47
{
  config,
  lib,
  pkgs,
  ...
}:
with lib; {
  config = {
    cynerd = {
      switch = {
        enable = true;
        lanAddress = "${config.cynerd.hosts.adm.omnia2}/24";
        lanGateway = config.cynerd.hosts.adm.omnia;
      };
      wifiAP.adm = {
        enable = true;
        ar9287.interface = "wlp2s0";
        qca988x.interface = "wlp1s0";
      };
    };

    services.btrfs.autoScrub = {
      enable = true;
      fileSystems = ["/"];
    };

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