about summary refs log tree commit diff
path: root/machines/asus
diff options
context:
space:
mode:
Diffstat (limited to 'machines/asus')
-rw-r--r--machines/asus/brcm.nix17
-rw-r--r--machines/asus/hardware-configuration.nix10
2 files changed, 25 insertions, 2 deletions
diff --git a/machines/asus/brcm.nix b/machines/asus/brcm.nix
new file mode 100644
index 0000000..d72648d
--- /dev/null
+++ b/machines/asus/brcm.nix
@@ -0,0 +1,17 @@
+{ stdenv, fetchurl }:
+
+stdenv.mkDerivation {
+  name = "brcmfmac43340";
+
+  src = fetchurl {
+    url = "https://android.googlesource.com/platform/hardware/broadcom/wlan/+archive/master/bcmdhd/firmware/bcm43341.tar.gz";
+    sha256 = "1vm5yvxznkvsbdvnhm10dci33i0b9flzqalpbgvmzyd95vi7s4bm";
+  };
+
+  installPhase = ''
+    mkdir -p $out/lib/firmware/brcm
+
+    cp fw_bcm43341.bin $out/lib/firmware/brcm/brcmfmac43340-sdio.bin
+    cp fw_bcm43341.bin $out/lib/firmware/brcm/brcmfmac43341-sdio.bin
+  '';
+}
diff --git a/machines/asus/hardware-configuration.nix b/machines/asus/hardware-configuration.nix
index 180bfdc..cad1522 100644
--- a/machines/asus/hardware-configuration.nix
+++ b/machines/asus/hardware-configuration.nix
@@ -9,8 +9,8 @@
     ];
 
   boot.initrd.availableKernelModules = [ "xhci_pci" "usb_storage" "usbhid" "sd_mod" "sdhci_acpi" ];
-  boot.initrd.kernelModules = [ ];
-  boot.kernelModules = [ "kvm-intel" "brcmfmac" ];
+  boot.initrd.kernelModules = [ "brcmfmac" ];
+  boot.kernelModules = [ "kvm-intel" ];
   boot.extraModulePackages = [ ];
 
   boot.kernelParams = [ "intel_idle.max_cstate=1" ];
@@ -26,6 +26,12 @@
     }
   ];
 
+  hardware.enableRedistributableFirmware = true;
+  hardware.enableAllFirmware = true;
+  hardware.firmware = [
+    (pkgs.callPackage ./brcm.nix {})
+  ];
+
   boot.loader = {
     efi = {
       canTouchEfiVariables = true;