aboutsummaryrefslogtreecommitdiff
path: root/nixos/machine/spt-omnia.nix
blob: d2c4a96c987a8b0d0a50d073fa901d562dede4da (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
{ 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 = [ "eth2" ];
    };

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

      overrideDevices = false;
      overrideFolders = false;

      dataDir = "/data";
    };

  };

}