| 1 Nov 2025 |
crushing-smite | Here are the supposed config files which failed to produce the ones missing above:
╭─ ~ ······························································································································ 3s
╰─❯ systemctl show hostapd.service | grep ExecStart
ExecStartPre={ path=/nix/store/4k91b9yj4kajw1naszj9rydijcw9cl6k-unit-script-hostapd-pre-start/bin/hostapd-pre-start ; argv[]=/nix/store/4k91b9yj4kajw1naszj9rydijcw9cl6k-unit-script-hostapd-pre-start/bin/hostapd-pre-start ; ignore_errors=no ; start_time=[Sat 2025-11-01 21:31:31 UTC] ; stop_time=[Sat 2025-11-01 21:31:31 UTC] ; pid=974 ; code=exited ; status=0 }
ExecStartPreEx={ path=/nix/store/4k91b9yj4kajw1naszj9rydijcw9cl6k-unit-script-hostapd-pre-start/bin/hostapd-pre-start ; argv[]=/nix/store/4k91b9yj4kajw1naszj9rydijcw9cl6k-unit-script-hostapd-pre-start/bin/hostapd-pre-start ; flags= ; start_time=[Sat 2025-11-01 21:31:31 UTC] ; stop_time=[Sat 2025-11-01 21:31:31 UTC] ; pid=974 ; code=exited ; status=0 }
ExecStart={ path=/nix/store/x9p8c0x9szf7wd91m07xa9wm532s07fh-hostapd-2.11/bin/hostapd ; argv[]=/nix/store/x9p8c0x9szf7wd91m07xa9wm532s07fh-hostapd-2.11/bin/hostapd /run/hostapd/wlp5s0.hostapd.conf ; ignore_errors=no ; start_time=[Sat 2025-11-01 21:31:31 UTC] ; stop_time=[Sat 2025-11-01 21:31:31 UTC] ; pid=986 ; code=exited ; status=1 }
ExecStartEx={ path=/nix/store/x9p8c0x9szf7wd91m07xa9wm532s07fh-hostapd-2.11/bin/hostapd ; argv[]=/nix/store/x9p8c0x9szf7wd91m07xa9wm532s07fh-hostapd-2.11/bin/hostapd /run/hostapd/wlp5s0.hostapd.conf ; flags= ; start_time=[Sat 2025-11-01 21:31:31 UTC] ; stop_time=[Sat 2025-11-01 21:31:31 UTC] ; pid=986 ; code=exited ; status=1 }
╭─ ~ ··································································································································
╰─❯ cat /nix/store/4k91b9yj4kajw1naszj9rydijcw9cl6k-unit-script-hostapd-pre-start/bin/hostapd-pre-start
#!/nix/store/cl2gkgnh26mmpka81pc2g5bzjfrili92-bash-5.3p3/bin/bash
set -e
/nix/store/xp4qhcx49n9a847c2jf9kdkhfacwyrki-make-hostapd-wlp5s0-files
╭─ ~ ··································································································································
╰─❯ cat /nix/store/xp4qhcx49n9a847c2jf9kdkhfacwyrki-make-hostapd-wlp5s0-files
#!/nix/store/cl2gkgnh26mmpka81pc2g5bzjfrili92-bash-5.3p3/bin/bash
set -euo pipefail
hostapd_config_file=/run/hostapd/wlp5s0.hostapd.conf
rm -f "$hostapd_config_file"
cat > "$hostapd_config_file" <<EOF
# Radio base configuration: wlp5s0
################################
EOF
cat /nix/store/0qb6bl6n8l8y4srv009nk72228j2yzfk-hostapd-radio-wlp5s0-extra.conf >> "$hostapd_config_file"
# BSS configuration: wlp5s0
mac_allow_file=/run/hostapd/wlp5s0.mac.allow
rm -f "$mac_allow_file"
touch "$mac_allow_file"
mac_deny_file=/run/hostapd/wlp5s0.mac.deny
rm -f "$mac_deny_file"
touch "$mac_deny_file"
cat /nix/store/39551igc1w77yy0ad0ivjywz6v92716g-hostapd-radio-wlp5s0-bss-wlp5s0.conf >> "$hostapd_config_file"
cat /nix/store/9xg1z67s9hyb92ns5jvh9ls3ca9mc1bw-hostapd-radio-wlp5s0-bss-wlp5s0-extra.conf >> "$hostapd_config_file"
╭─ ~ ··································································································································
╰─❯ cat /nix/store/0qb6bl6n8l8y4srv009nk72228j2yzfk-hostapd-radio-wlp5s0-extra.conf
channel=44
country_code=DE
driver=nl80211
ht_capab=[HT40][SHORT-GI-20][SHORT-GI-40]
hw_mode=a
ieee80211ac=1
ieee80211d=1
ieee80211h=1
ieee80211n=1
noscan=0
require_ht=0
require_vht=1
vht_capab=
vht_oper_chwidth=1
╭─ ~ ··································································································································
╰─❯ cat /nix/store/39551igc1w77yy0ad0ivjywz6v92716g-hostapd-radio-wlp5s0-bss-wlp5s0.conf
# BSS 0: wlp5s0
################################
interface=wlp5s0
╭─ ~ ··································································································································
╰─❯ cat /nix/store/9xg1z67s9hyb92ns5jvh9ls3ca9mc1bw-hostapd-radio-wlp5s0-bss-wlp5s0-extra.conf
ap_isolate=0
auth_algs=1
beacon_int=50
bridge=br0
ctrl_interface=/run/hostapd
ctrl_interface_group=wheel
ieee80211w=1
ignore_broadcast_ssid=0
logger_stdout=-1
logger_stdout_level=0
logger_syslog=-1
logger_syslog_level=0
macaddr_acl=0
rsn_pairwise=CCMP GCMP GCMP-256
sae_require_mfp=1
ssid=SsidName
utf8_ssid=1
wmm_enabled=1
wpa=2
wpa_key_mgmt=WPA-PSK-SHA256
wpa_pairwise=CCMP GCMP GCMP-256
wpa_passphrase=password
| 22:03:22 |
K900 | Can you also post your NixOS side config? | 22:04:11 |
crushing-smite | Sure, but before that, may I have second opinion on some AI slop? | 22:04:32 |
K900 | No | 22:04:47 |
crushing-smite | Ok, brb | 22:04:52 |
K900 | Not from me, anyway | 22:04:53 |
crushing-smite | Here:
{
config,
lib,
pkgs,
...
}: {
imports = [
./hardware-configuration.nix
./wireless.nix
];
boot.kernelParams = [
"console=ttyS0,115200"
"console=tty1"
];
networking.wireless = {
enable = true;
interfaces = [ "wlan0" ];
networks = {
"UpstreamRouter" = {
psk = "UpstreamRouterPassword";
};
};
};
networking.networkmanager.enable = false;
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
systemd.network.wait-online.enable = false;
services.openssh = {
enable = true;
settings.PasswordAuthentication = true;
settings.PermitRootLogin = "yes";
settings.KbdInteractiveAuthentication = true;
settings.X11Forwarding = true;
};
networking.firewall = {
checkReversePath = "loose";
};
networking.firewall.interfaces.br0.allowedUDPPorts = [ 67 22 ];
networking.firewall.interfaces.br0.allowedTCPPorts = [ 67 22 ];
environment.systemPackages = with pkgs; [
nmap
wireguard-tools
wget
du-dust
bat
git
curl
vim
htop
tree
xorg.xauth
xclip
wavemon
nettools
];
boot.kernel.sysctl."net.ipv4.ip_forward" = 1;
boot.kernel.sysctl."net.ipv6.conf.all.forwarding" = 1;
networking.nat = {
enable = true;
externalInterface = "wlp0s20f0u7i3";
internalInterfaces = ["br0"];
};
systemd.network.enable = true;
systemd.network = {
netdevs = {
"20-br0" = {
netdevConfig = {
Kind = "bridge";
Name = "br0";
};
};
};
networks = {
"05-wlan-usb" = {
matchConfig.MACAddress = "00:c0:ca:b7:8c:b4";
DHCP = "yes";
dhcpV4Config = {
RouteMetric = 100;
};
networkConfig = {
IgnoreCarrierLoss = "10s";
};
};
"10-enp1s0" = {
matchConfig.Name = "enp1s0";
linkConfig.RequiredForOnline = "no";
DHCP = "yes";
dhcpV4Config = {
RouteMetric = 200;
};
};
"30-enp2s0" = {
matchConfig.Name = "enp2s0";
networkConfig.Bridge = "br0";
linkConfig.RequiredForOnline = "no";
DHCP = "no";
};
"30-enp3s0" = {
matchConfig.Name = "enp3s0";
networkConfig.Bridge = "br0";
linkConfig.RequiredForOnline = "no";
DHCP = "no";
};
"30-enp4s0" = {
matchConfig.Name = "enp4s0";
networkConfig.Bridge = "br0";
linkConfig.RequiredForOnline = "no";
DHCP = "no";
};
"40-br0" = {
matchConfig.Name ="br0";
networkConfig = {
DHCPServer = "yes";
IPMasquerade = "ipv4";
};
address = [ "192.168.200.1/24" ];
dhcpServerConfig = {
EmitDNS = "yes";
DNS = "1.1.1.1";
};
bridgeConfig = {};
linkConfig = {
RequiredForOnline = "no";
};
};
};
};
system.stateVersion = "23.11";
}
| 22:07:06 |
crushing-smite | * Here:
{
config,
lib,
pkgs,
...
}: {
imports = [
./hardware-configuration.nix
./wireless.nix
];
boot.kernelParams = [
"console=ttyS0,115200"
"console=tty1"
];
networking.wireless = {
enable = true;
interfaces = [ "wlan0" ];
networks = {
"UpstreamRouter" = {
psk = "UpstreamRouterPassword";
};
};
};
networking.networkmanager.enable = false;
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
systemd.network.wait-online.enable = false;
services.openssh = {
enable = true;
settings.PasswordAuthentication = true;
settings.PermitRootLogin = "yes";
settings.KbdInteractiveAuthentication = true;
settings.X11Forwarding = true;
};
networking.firewall = {
checkReversePath = "loose";
};
networking.firewall.interfaces.br0.allowedUDPPorts = [ 67 22 ];
networking.firewall.interfaces.br0.allowedTCPPorts = [ 67 22 ];
environment.systemPackages = with pkgs; [
nmap
wireguard-tools
wget
du-dust
bat
git
curl
vim
htop
tree
xorg.xauth
xclip
wavemon
nettools
];
boot.kernel.sysctl."net.ipv4.ip_forward" = 1;
boot.kernel.sysctl."net.ipv6.conf.all.forwarding" = 1;
networking.nat = {
enable = true;
externalInterface = "wlp0s20f0u7i3";
internalInterfaces = ["br0"];
};
systemd.network.enable = true;
systemd.network = {
netdevs = {
"20-br0" = {
netdevConfig = {
Kind = "bridge";
Name = "br0";
};
};
};
networks = {
"05-wlan-usb" = {
matchConfig.MACAddress = "00:c0:ca:b7:8c:b4";
DHCP = "yes";
dhcpV4Config = {
RouteMetric = 100;
};
networkConfig = {
IgnoreCarrierLoss = "10s";
};
};
"10-enp1s0" = {
matchConfig.Name = "enp1s0";
linkConfig.RequiredForOnline = "no";
DHCP = "yes";
dhcpV4Config = {
RouteMetric = 200;
};
};
"30-enp2s0" = {
matchConfig.Name = "enp2s0";
networkConfig.Bridge = "br0";
linkConfig.RequiredForOnline = "no";
DHCP = "no";
};
"30-enp3s0" = {
matchConfig.Name = "enp3s0";
networkConfig.Bridge = "br0";
linkConfig.RequiredForOnline = "no";
DHCP = "no";
};
"30-enp4s0" = {
matchConfig.Name = "enp4s0";
networkConfig.Bridge = "br0";
linkConfig.RequiredForOnline = "no";
DHCP = "no";
};
"40-br0" = {
matchConfig.Name ="br0";
networkConfig = {
DHCPServer = "yes";
IPMasquerade = "ipv4";
};
address = [ "192.168.200.1/24" ];
dhcpServerConfig = {
EmitDNS = "yes";
DNS = "1.1.1.1";
};
bridgeConfig = {};
linkConfig = {
RequiredForOnline = "no";
};
};
};
};
system.stateVersion = "23.11";
}
| 22:07:12 |
K900 | There's no hostapd config here? | 22:07:49 |
crushing-smite | It's in wireless.nix, which is above in the chat, reposting:
{
config,
lib,
pkgs,
...
}: {
boot.extraModprobeConfig = ''
options cfg80211 ieee80211_regdom="DE"
'';
hardware.wirelessRegulatoryDatabase = true;
services.hostapd = {
enable = true;
radios."wlp5s0" = {
wifi5 = {
enable = true;
operatingChannelWidth = "80";
require = true;
};
countryCode = "DE";
channel = 44;
band = "5g";
networks.wlp5s0 = {
logLevel = 0;
ssid = "SsidName";
authentication = {
mode = "wpa2-sha256";
wpaPassword = "password";
enableRecommendedPairwiseCiphers = true;
};
settings = {
bridge = "br0";
beacon_int = 50;
};
};
};
};
}
| 22:08:51 |
K900 | That does look fairly normal | 22:09:30 |
K900 | I'm not entirely sure why it's rejecting that mode | 22:09:50 |
K900 | Try setting log level to and running it again | 22:09:52 |
crushing-smite | It's at lowest possible | 22:10:06 |
K900 | Anything in dmesg | grep mt76+ maybe? | 22:11:00 |
K900 | * Anything in dmesg | grep mt7 maybe? | 22:11:10 |
crushing-smite | ╰─❯ dmesg | grep mt7
[ 4.692938] mt7921e 0000:05:00.0: ASIC revision: 79220010
[ 4.768676] mt7921e 0000:05:00.0: HW/SW Version: 0x8a108a10, Build Time: 20250903123148a
[ 4.785309] mt7921e 0000:05:00.0: WM Firmware Version: ____000000, Build Time: 20250903123243
[ 4.997376] usbcore: registered new interface driver mt7921u
[ 4.999834] mt7921u 1-7.1.1:1.3: HW/SW Version: 0x8a108a10, Build Time: 20250625153620a
[ 5.015635] mt7921u 1-7.1.1:1.3: WM Firmware Version: ____010000, Build Time: 20250625153703
[ 5.912608] mt7921e 0000:05:00.0 wlp5s0: renamed from wlan0
[ 93.172491] mt7921e 0000:05:00.0 wlp5s0: entered allmulticast mode
[ 93.172665] mt7921e 0000:05:00.0 wlp5s0: entered promiscuous mode
[ 93.177269] mt7921e 0000:05:00.0 wlp5s0: left allmulticast mode
[ 93.177303] mt7921e 0000:05:00.0 wlp5s0: left promiscuous mode
[ 93.551527] mt7921e 0000:05:00.0 wlp5s0: entered allmulticast mode
[ 93.552388] mt7921e 0000:05:00.0 wlp5s0: entered promiscuous mode
[ 93.554463] mt7921e 0000:05:00.0 wlp5s0: left allmulticast mode
[ 93.554486] mt7921e 0000:05:00.0 wlp5s0: left promiscuous mode
[ 94.120763] mt7921e 0000:05:00.0 wlp5s0: entered allmulticast mode
[ 94.121633] mt7921e 0000:05:00.0 wlp5s0: entered promiscuous mode
[ 94.123950] mt7921e 0000:05:00.0 wlp5s0: left allmulticast mode
[ 94.123972] mt7921e 0000:05:00.0 wlp5s0: left promiscuous mode
[ 94.611620] mt7921e 0000:05:00.0 wlp5s0: entered allmulticast mode
[ 94.612456] mt7921e 0000:05:00.0 wlp5s0: entered promiscuous mode
[ 94.614752] mt7921e 0000:05:00.0 wlp5s0: left allmulticast mode
[ 94.614777] mt7921e 0000:05:00.0 wlp5s0: left promiscuous mode
[ 95.119282] mt7921e 0000:05:00.0 wlp5s0: entered allmulticast mode
[ 95.120179] mt7921e 0000:05:00.0 wlp5s0: entered promiscuous mode
[ 95.122213] mt7921e 0000:05:00.0 wlp5s0: left allmulticast mode
[ 95.122234] mt7921e 0000:05:00.0 wlp5s0: left promiscuous mode
| 22:11:42 |
crushing-smite | (the wifi usb dongle which provides connectivity to internet is near the same (same?) chipset - u VS e difference) | 22:12:25 |
K900 | Well it working in STA mode is not surprising | 22:14:19 |
K900 | What is surprising is it behaving this badly in AP mode | 22:14:27 |
K900 | And seemingly not providing a reason | 22:14:46 |
K900 | Actually, what kernel version is that? | 22:15:09 |
crushing-smite | Linux nixos 6.12.53 | 22:15:33 |
K900 | Try linuxPackages_latest | 22:16:37 |
crushing-smite | There's also this warning each time I rebuild:
evaluation warning: The combination of `systemd.network.enable = true`, `networking.useDHCP = true` and `networking.useNetworkd = false` can cause both networkd and dhcpcd to manage the same interfaces. This can lead to loss of networking. It is recommended you choose only one of networkd (by also enabling `networking.useNetworkd`) or scripting (by disabling `systemd.network.enable`)
| 22:18:16 |
crushing-smite | * There's also this warning each time I rebuild:
""" evaluation warning: The combination of systemd.network.enable = true, networking.useDHCP = true and networking.useNetworkd = false can cause both networkd and dhcpcd to manage the same interfaces. This can lead to loss of networking. It is recommended you choose only one of networkd (by also enabling networking.useNetworkd) or scripting (by disabling systemd.network.enable) """
| 22:18:26 |
K900 | This is fine for your particular setup | 22:18:37 |
K900 | Though you may want to fix it | 22:18:41 |
crushing-smite | ╰─❯ uname -a
Linux nixos 6.17.3 #1-NixOS SMP PREEMPT_DYNAMIC Wed Oct 15 10:04:23 UTC 2025 x86_64 GNU/Linux
| 22:21:30 |
crushing-smite | ...skipping...
Nov 01 22:20:33 nixos hostapd[962]: nl80211: deinit ifname=wlp5s0 disabled_11b_rates=0
Nov 01 22:20:33 nixos hostapd[962]: nl80211: Failed to remove interface wlp5s0 from bridge br0: Invalid argument
Nov 01 22:20:33 nixos systemd[1]: hostapd.service: Main process exited, code=exited, status=1/FAILURE
Nov 01 22:20:33 nixos systemd[1]: hostapd.service: Failed with result 'exit-code'.
Nov 01 22:20:34 nixos systemd[1]: hostapd.service: Scheduled restart job, restart counter is at 3.
Nov 01 22:20:34 nixos systemd[1]: Starting IEEE 802.11 Host Access-Point Daemon...
Nov 01 22:20:34 nixos systemd[1]: Started IEEE 802.11 Host Access-Point Daemon.
Nov 01 22:20:34 nixos hostapd[978]: wlp5s0: interface state UNINITIALIZED->COUNTRY_UPDATE
Nov 01 22:20:34 nixos hostapd[978]: Interface initialization failed
Nov 01 22:20:34 nixos hostapd[978]: wlp5s0: interface state COUNTRY_UPDATE->DISABLED
Nov 01 22:20:34 nixos hostapd[978]: wlp5s0: AP-DISABLED
Nov 01 22:20:34 nixos hostapd[978]: wlp5s0: Unable to setup interface.
Nov 01 22:20:34 nixos hostapd[978]: wlp5s0: interface state DISABLED->DISABLED
Nov 01 22:20:34 nixos hostapd[978]: wlp5s0: AP-DISABLED
Nov 01 22:20:34 nixos hostapd[978]: wlp5s0: CTRL-EVENT-TERMINATING
Nov 01 22:20:34 nixos hostapd[978]: rmdir[ctrl_interface=/run/hostapd]: Device or resource busy
Nov 01 22:20:34 nixos hostapd[978]: hostapd_free_hapd_data: Interface wlp5s0 wasn't started
Nov 01 22:20:34 nixos hostapd[978]: nl80211: deinit ifname=wlp5s0 disabled_11b_rates=0
Nov 01 22:20:34 nixos hostapd[978]: nl80211: Failed to remove interface wlp5s0 from bridge br0: Invalid argument
Nov 01 22:20:34 nixos systemd[1]: hostapd.service: Main process exited, code=exited, status=1/FAILURE
Nov 01 22:20:34 nixos systemd[1]: hostapd.service: Failed with result 'exit-code'.
Nov 01 22:20:34 nixos systemd[1]: hostapd.service: Scheduled restart job, restart counter is at 4.
Nov 01 22:20:34 nixos systemd[1]: Starting IEEE 802.11 Host Access-Point Daemon...
Nov 01 22:20:34 nixos systemd[1]: Started IEEE 802.11 Host Access-Point Daemon.
Nov 01 22:20:34 nixos hostapd[994]: wlp5s0: interface state UNINITIALIZED->COUNTRY_UPDATE
Nov 01 22:20:34 nixos hostapd[994]: Interface initialization failed
Nov 01 22:20:34 nixos hostapd[994]: wlp5s0: interface state COUNTRY_UPDATE->DISABLED
Nov 01 22:20:34 nixos hostapd[994]: wlp5s0: AP-DISABLED
Nov 01 22:20:34 nixos hostapd[994]: wlp5s0: Unable to setup interface.
Nov 01 22:20:34 nixos hostapd[994]: wlp5s0: interface state DISABLED->DISABLED
Nov 01 22:20:34 nixos hostapd[994]: wlp5s0: AP-DISABLED
Nov 01 22:20:34 nixos hostapd[994]: wlp5s0: CTRL-EVENT-TERMINATING
Nov 01 22:20:34 nixos hostapd[994]: rmdir[ctrl_interface=/run/hostapd]: Device or resource busy
Nov 01 22:20:34 nixos hostapd[994]: hostapd_free_hapd_data: Interface wlp5s0 wasn't started
Nov 01 22:20:34 nixos hostapd[994]: nl80211: deinit ifname=wlp5s0 disabled_11b_rates=0
Nov 01 22:20:34 nixos hostapd[994]: nl80211: Failed to remove interface wlp5s0 from bridge br0: Invalid argument
Nov 01 22:20:34 nixos systemd[1]: hostapd.service: Main process exited, code=exited, status=1/FAILURE
Nov 01 22:20:34 nixos systemd[1]: hostapd.service: Failed with result 'exit-code'.
Nov 01 22:20:35 nixos systemd[1]: hostapd.service: Scheduled restart job, restart counter is at 5.
Nov 01 22:20:35 nixos systemd[1]: hostapd.service: Start request repeated too quickly.
Nov 01 22:20:35 nixos systemd[1]: hostapd.service: Failed with result 'exit-code'.
Nov 01 22:20:35 nixos systemd[1]: Failed to start IEEE 802.11 Host Access-Point Daemon.
| 22:21:49 |