aboutsummaryrefslogtreecommitdiff
path: root/nixos/machine/adm-omnia.nix
blob: 437831b82373b9a2e170439e6f7f5d9cb855edf8 (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
{
  config,
  lib,
  pkgs,
  ...
}:
with lib; {
  config = {
    cynerd = {
      router = {
        enable = true;
        wan = "end2"; # TODO pppoe-wan
        lanIP = config.cynerd.hosts.adm.omnia;
      };
      wifiAP.adm = {
        enable = true;
        ar9287.interface = "wlp3s0";
        qca988x.interface = "wlp2s0";
      };
      openvpn.oldpersonal = false;
      monitoring.speedtest = true;
    };

    services.pppd = {
      enable = false;
      peers."wan".config = ''
        plugin pppoe.so end2
        ifname pppoe-wan
        lcp-echo-interval 1
        lcp-echo-failure 5
        lcp-echo-adaptive
        +ipv6
        defaultroute
        defaultroute6
        usepeerdns
        maxfail 1
        user O2
        password 02
      '';
    };
    #systemd.services."pppd-wan".after = ["sys-subsystem-net-devices-end2.device"];

    networking.bridges = {
      brlan.interfaces = ["lan1" "lan2" "lan3" "lan4"];
      brguest.interfaces = ["lan0"];
    };
  };
}