1 { pkgs, lib, hostName, ... }:
2 with (import ./names-and-numbers.nix);
5 ../../../nixos/profiles/networking/wifi.nix
7 networking.interfaces = {
10 ipv4.addresses = [{ address = "${wifiIPv4}.1"; prefixLength = 24; }];
13 address = "${wifiIPv4}.0";
15 options = { congctl = "westwood"; };
20 networking.nftables.ruleset = lib.mkAfter ''
23 iifname ${wifiIface} jump input-lan
24 iifname ${wifiIface} log level warn prefix "input-lan: " counter drop
27 oifname ${wifiIface} jump output-lan
28 oifname ${wifiIface} log level warn prefix "output-lan: " counter drop
30 chain forward-to-wifi {
33 chain forward-from-wifi {
37 iifname { ${eth1Iface}, ${eth2Iface}, ${eth3Iface} } oifname ${wifiIface} goto forward-to-wifi
38 iifname ${wifiIface} oifname { ${eth1Iface}, ${eth2Iface}, ${eth3Iface} } goto forward-from-wifi
43 networking.networkmanager.unmanaged = [ wifiIface ];
44 systemd.services.dhcpd4.onFailure = [ "network-addresses-${wifiIface}.service" ];
47 interfaces = [ wifiIface ];
49 subnet ${wifiIPv4}.0 netmask 255.255.255.0 {
50 range ${wifiIPv4}.100 ${wifiIPv4}.200;
51 option broadcast-address ${wifiIPv4}.255;
52 option domain-name-servers ${wifiIPv4}.1;
53 option routers ${wifiIPv4}.1;
54 option subnet-mask 255.255.255.0;
58 # iw dev wlp5s0 station dump
59 # DOC: https://w1.fi/cgit/hostap/plain/hostapd/hostapd.conf
63 interface = wifiIface;
64 # 0 means the AP will search for the channel with the least interferences (ACS)
69 #wpaPassphrase = "bidonpoissonmaisonronron";
74 dtim_period=2 # DTIM (delivery trafic information message)
76 # limit the frequencies used to those allowed in the country
83 #auth_algs=1 # 0=noauth, 1=wpa, 2=wep, 3=both
85 # QoS support, also required for full speed on 802.11n/ac/ax
87 eap_reauth_period=360000
94 # See Capabilities in iw list
95 #ht_capab=[HT40+][SHORT-GI-40][DSSS_CCK-40][MAX-AMSDU-3839]