summaryrefslogtreecommitdiffstats
path: root/krebs/1systems/puyak/net.nix
blob: c535e51aaeda667ee16133c280acf9631900ab59 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
let
  ext-if = "et0";
  shack-ip = "10.42.22.184";
  shack-gw = "10.42.20.1";
in {
  services.udev.extraRules = ''
    SUBSYSTEM=="net", ATTR{address}=="8c:70:5a:b2:84:58", NAME="wl0"
    SUBSYSTEM=="net", ATTR{address}=="3c:97:0e:07:b9:14", NAME="${ext-if}"
  '';
  networking = {
    firewall.enable = true;
    firewall.allowedTCPPorts = [ 8088 8086 8083 5901 ];
    interfaces."${ext-if}".ipv4.addresses = [
      {
        address = shack-ip;
        prefixLength = 22;
      }
    ];

    defaultGateway = shack-gw;
    nameservers = [ "10.42.0.100" "10.42.0.200" ];
  };
}