This NixOS flake provides out-of-tree kernel modules and firmware for the MediaTek MT7927 / MT6639 (Filogic 380) Wi-Fi 7 and Bluetooth combo card.
- Patched Bluetooth: Includes the
btusbandbtmtkpatches required to initialize the MT6639 Bluetooth stack on Linux. - ASPM Fix: Automatically applies a udev rule to disable PCIe Active State Power Management (ASPM) for this device, which fixes common "stuck upload" and packet loss issues.
- Auto-Firmware Extraction: Automatically downloads the latest official ASUS Windows drivers and extracts the necessary
.binfirmware files using Python scripts. - Automated Updates: A GitHub Action keeps the driver patches and kernel source hashes in sync with the latest stable kernel releases.
Add this repository to your inputs:
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
mt7927.url = "github:cmspam/mt7927-nixos";
};
outputs = { self, nixpkgs, mt7927, ... }: {
nixosConfigurations.your-hostname = nixpkgs.lib.nixosSystem {
specialArgs = { inherit mt7927; };
modules = [
# ... your other modules
mt7927.nixosModules.default
];
};
};
}Activate the module and its features:
{
hardware.mediatek-mt7927 = {
enable = true;
enableWifi = true;
enableBluetooth = true;
# Highly recommended to fix upload speed issues
disableAspm = true;
};
}After applying the configuration and rebooting, you can verify the drivers are loaded:
Bluetooth Check:
modinfo btusb | grep filename
# Result should point to a path in /nix/store/WiFi Check:
lsmod | grep mt7925- Patches and firmware extraction logic based on jetm/mediatek-mt7927-dkms.