# NixOS on Framework Laptop 13

**URL:** <https://community.frame.work/t/nixos-on-framework-laptop-13/31426>\
**Category:** Linux\
**Tags:** nixos\
**Created:** [May 24, 2023, 7:16pm UTC](https://community.frame.work/t/nixos-on-framework-laptop-13/31426 "2023-05-24T19:16:40Z")\
**Posts on this page:** 1\
**Showing post:** 77

<div class="post-metadata">

**Author:** ![lytedev](https://sea1.discourse-cdn.com/flex001/user_avatar/community.frame.work/lytedev/32/18500_2.png) [@lytedev](https://community.frame.work/u/lytedev)\
**Post date:** [November 17, 2023, 11:24am UTC](https://community.frame.work/t/nixos-on-framework-laptop-13/31426/77 "2023-11-17T11:24:50Z")

</div>

Not sure who else this will help, but I was having wifi issues and not getting the expected performance from my hardware.

```shell
$ 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](https://wiki.archlinux.org/title/Framework_Laptop_13#WiFi/Bluetooth) 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](https://wiki.archlinux.org/title/Network_configuration/Wireless#Respecting_the_regulatory_domain)

Which led me to this nixpkgs issue with the solution:

> <https://github.com/NixOS/nixpkgs/issues/25378>
>
> Just an idea for a NixOS module setting for setting the wireless regulatory doma…in. Usually set by doing \`iw reg set AU\`.
> 
> Note that this isn't always possible depending on the wireless driver and wireless card, some cards like Intel have some sort of managed mode or hardware lock that auto locks it to somewhere. My intel 7265D actually fixes it to "00-World", seemingly not able to detect where it is or allow it to be manually specified.
> 
> I do not know how this interacts with hostapd country\_code specification.

So I added this to my nixos config:

```auto
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](http://fast.com) and dropping no packets while doing so.

---

_[View the full topic](https://community.frame.work/t/nixos-on-framework-laptop-13/31426)._
