aboutsummaryrefslogtreecommitdiff
path: root/nixos/machine/spt-omnia.nix
blob: 6db1f7b5450e86d99acebcc423bd19cc3fa63737 (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
55
{
  config,
  lib,
  pkgs,
  ...
}:
with lib; {
  config = {
    cynerd = {
      openvpn.oldpersonal = true;
    };

    networking = {
      # TODO we need vlan filtering to filter out guest network
      bridges = {
        brlan = {
          interfaces = [
            "lan0"
            "lan1"
            "lan2"
            "lan3"
            "lan4"
          ];
        };
        #brguest = {
        #  interfaces = [
        #    "brlan.2" #"mlan0host" "wlp1s0host"
        #  ];
        #};
      };
      interfaces.brlan = {
        ipv4 = {
          addresses = [
            {
              address = config.cynerd.hosts.spt.omnia;
              prefixLength = 24;
            }
          ];
        };
      };
      nameservers = ["127.0.0.1" "1.1.1.1" "8.8.8.8"];
      dhcpcd.allowInterfaces = ["end2"];
    };

    services.syncthing = {
      enable = true;
      openDefaultPorts = true;

      overrideDevices = false;
      overrideFolders = false;

      dataDir = "/data";
    };
  };
}