aboutsummaryrefslogtreecommitdiff
path: root/nixos/configurations/spt-mox.nix
blob: 4e29bca90cdd8f3e88a589ee5026bb5f7e26b3c8 (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
48
49
50
51
52
53
54
{config, ...}: {
  turris.board = "mox";
  deploy = {
    enable = true;
    ssh.host = "mox.spt";
  };

  cynerd = {
    home-assistant = true;
    monitoring.drives = false;
    switch = {
      enable = true;
      lanAddress = "${config.cynerd.hosts.spt.mox}/24";
      lanGateway = config.cynerd.hosts.spt.omnia;
    };
    wifiAP.spt = {
      enable = true;
      qca988x = {
        interface = "wlp1s0";
        bssids = ["04:f0:21:24:24:d2" "08:f0:21:24:24:d2"];
        channel = 7;
      };
    };
  };

  services.journald.extraConfig = ''
    SystemMaxUse=512M
  '';

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

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