1 { pkgs, lib, config, hostName, ... }:
2 with (import ./names-and-numbers.nix);
4 environment.systemPackages = [
7 networking.interfaces = {
10 ipv4.addresses = [ { address = "${wifiIPv4}.1"; prefixLength = 24; } ];
12 { address = "${wifiIPv4}.0";
14 options = { congctl="westwood";};
19 networking.nftables.ruleset = lib.mkAfter ''
22 iifname ${wifiIface} jump input-lan
23 iifname ${wifiIface} log level warn prefix "input-lan: " counter drop
26 oifname ${wifiIface} jump output-lan
27 oifname ${wifiIface} log level warn prefix "output-lan: " counter drop
32 networking.networkmanager.unmanaged = [ wifiIface ];
33 services.dnscrypt-proxy2.settings.listen_addresses = [ "${wifiIPv4}.1:53" ];
34 systemd.services.dhcpd4.onFailure = [ "network-addresses-${wifiIface}.service" ];
37 interfaces = [ wifiIface ];
39 subnet ${wifiIPv4}.0 netmask 255.255.255.0 {
40 range ${wifiIPv4}.100 ${wifiIPv4}.200;
41 option broadcast-address ${wifiIPv4}.255;
42 option domain-name-servers ${wifiIPv4}.1;
43 option routers ${wifiIPv4}.1;
44 option subnet-mask 255.255.255.0;
48 # iw dev wlp5s0 station dump
49 # DOC: https://w1.fi/cgit/hostap/plain/hostapd/hostapd.conf
53 interface = wifiIface;
54 # 0 means the AP will search for the channel with the least interferences (ACS)
59 #wpaPassphrase = "bidonpoissonmaisonronron";
64 dtim_period=2 # DTIM (delivery trafic information message)
66 # limit the frequencies used to those allowed in the country
73 #auth_algs=1 # 0=noauth, 1=wpa, 2=wep, 3=both
75 # QoS support, also required for full speed on 802.11n/ac/ax
77 eap_reauth_period=360000
84 # See Capabilities in iw list
85 #ht_capab=[HT40+][SHORT-GI-40][DSSS_CCK-40][MAX-AMSDU-3839]
94 services.openssh.listenAddresses = [
95 { addr = "${wifiIPv4}.1"; port = 22; }