diff --git a/apple/macbook-air/7/README.md b/apple/macbook-air/7/README.md index 3a9826210..35f82e4c6 100644 --- a/apple/macbook-air/7/README.md +++ b/apple/macbook-air/7/README.md @@ -3,3 +3,34 @@ ### For wifi driver broadcomt_sta was the best working driver I could find, however on the normal kernel, you need to `sudo modprobe -r wl` and `sudo modprobe wl`, however it was fully working on the zen kernel. + +# MacBook Air 7,2 + +## Issues + +> Wifi Driver doesn't work + +### Solution +* generated NixOS-Configuration via nixos-generate config on MacBook to load following modules: + +```nix + boot.kernelModules = [ "kvm-intel" "wl" ]; + boot.extraModulePackages = [ config.boot.kernelPackages.broadcom_sta ]; +``` + + +> Camera doesn't work + +### Solution + +```nix + hardware.facetimehd.enable = true; +``` + +* when added this line of code, another driver was loaded for the network controller, so wifi stopped working. +* by adding the modules to boot.initrd. both wifi and camera was working: + +### Solution +```nix + boot.initrd.kernelModules = [ "kvm-intel" "wl" ]; +``` diff --git a/apple/macbook-air/7/hardware-configuration.nix b/apple/macbook-air/7/hardware-configuration.nix new file mode 100644 index 000000000..5e3008d53 --- /dev/null +++ b/apple/macbook-air/7/hardware-configuration.nix @@ -0,0 +1,32 @@ + +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; + boot.initrd.kernelModules = [ "kvm-intel" "wl" ]; # is needed for wifi to work + boot.kernelModules = [ "kvm-intel" "wl" ]; + boot.extraModulePackages = [ config.boot.kernelPackages.broadcom_sta ]; + + + ## generated Filesystem configuration was removed here!!! + + + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (the default) this is the recommended approach. When using systemd-networkd it's + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces..useDHCP`. + networking.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + + ## Webcam + hardware.facetimehd.enable = true; +}