Not sure who else this will help, but I was having wifi issues and not getting the expected performance from my hardware.
$ lspci | rg -i wireless
01:00.0 Network controller: MEDIATEK Corp. MT7922 802.11ax PCI Express Wireless Network Adapter
I perused the Arch Linux wiki and found this note:
For the MediaTek chip, you will be limited to 802.11n (WiFi 4) and 2.4GHz bands if you do not configure the regulatory domain
Which led me to this nixpkgs issue with the solution:
So I added this to my nixos config:
hardware.wirelessRegulatoryDatabase = true;
boot.extraModprobeConfig = ''
options cfg80211 ieee80211_regdom="US"
'';
Naturally, you will want to use whatever regdomain code is relevant for your regulatory domain. After this, I’m getting much faster speeds according to fast.com and dropping no packets while doing so.