NixOS cannot connect to dual-band mesh home wifi

Stack Exchange post: networking - NixOS cannot connect to dual-band mesh home wifi - Unix & Linux Stack Exchange

My laptop running NixOs 24.11 with an Intel(R) Wi-Fi 6E AX211 160MHz adapter cannot connect to my home network using wifi (ethernet is working). Instead of the proper SSIDs showing up (either 2.4G or 5G), it shows only fhmesh_ followed by the hexidecimal mac address of my router. When I try to connect to it in my tiling windows manager, networkManager shows the error 802-11-wireless-security.key-mgmt: 'wpa-psk' is not a valid value for 'mesh' mode connections. When I try connecting to it using KDE Plasma, it shows 802-11-wireless.mode: connection does not match access point. I connecting to a hidden network with the name and password of my proper SSID, but networkManager could not find it.
I tried installing the iwlwifi kernel module (logs), the iw package, and pkgs.wireless-regdb in hardware.firmware but these don’t fix my issue. I ran iw reg get which showed that my regulatory country was TH: DFS-UNSET. I tried running sudo iw reg set for both CA (I’m in Canada) and US (My router’s WLAN settings page shows its country as UNITED STATES and I cannot change it). Neither option seemed to work. I tried switching to wpa-supplicant but that didn’t work either.

Extra info:

  • This issue seems to only effect my device when it’s under internet supplied by CIK Telecom, as I could not connect to wifi at another house under the same ISP. I can connect to wifi at places not supplied by this ISP and networkManager is currently able to detect my neighbor’s wifi.

  • This issue does not manifest when I dual-boot into Windows on the same machine (fast restart is already disabled). I am running Debian on another machine and it’s connecting to the wifi just fine. It’s connecting to the network with the proper SSID while also showing me the option to connect to fhmesh_. When I try connecting to fhmesh_, the same wpa-psk error shows up. iw reg get on this machine also returns TH: DFS-UNSET

  • My /etc/nixos is here

  • I just updated to nixos-unstable and this issue still persists

Summary

This text will be hidden

After inspecting NetworkManager.conf, it appears that NetworkManager on NixOS secretly uses wpa_supplicant as a backend. I switched the backend to iwd and the issue went away.