stockholm/krebs/1systems/puyak/net.nix

25 lines
624 B
Nix
Raw Normal View History

2020-11-24 21:11:59 +00:00
let
ext-if = "et0";
2020-11-24 21:11:59 +00:00
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}"
2020-11-24 21:11:59 +00:00
'';
2023-06-03 13:47:16 +00:00
networking.wireless.enable = true;
2020-11-24 21:11:59 +00:00
networking = {
2021-03-26 19:12:08 +00:00
firewall.enable = true;
2021-03-26 19:42:24 +00:00
firewall.allowedTCPPorts = [ 80 443 8088 8086 8083 5901 ];
2020-11-24 21:11:59 +00:00
interfaces."${ext-if}".ipv4.addresses = [
{
address = shack-ip;
prefixLength = 20;
2020-11-24 21:11:59 +00:00
}
];
defaultGateway = shack-gw;
nameservers = [ "10.42.0.100" "10.42.0.200" ];
};
}