Skip to content

FaceTimeHD-Camera and WiFi for MacBook-Air 7,2 #1543

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions apple/macbook-air/7/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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" ];
```
32 changes: 32 additions & 0 deletions apple/macbook-air/7/hardware-configuration.nix
Original file line number Diff line number Diff line change
@@ -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.<interface>.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;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To me it seems that this module is pretty much the same as apple-macbook-air-7. We tend to not duplicate nixos-generate-config in nixos-hardware and the only new option is facetimehd, which the apple module already enables.

}
Loading