Skip to content

Commit

Permalink
Apple iMac 14,2: init
Browse files Browse the repository at this point in the history
  • Loading branch information
drupol committed Aug 26, 2024
1 parent 9fc19be commit a2f4c10
Show file tree
Hide file tree
Showing 4 changed files with 114 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ See code for all available configurations.
|------------------------------------------------------------------------|---------------------------------------------------------|
| [Acer Aspire 4810T](acer/aspire/4810t) | `<nixos-hardware/acer/aspire/4810t>` |
| [Airis N990](airis/n990) | `<nixos-hardware/airis/n990>` |
| [Apple iMac 14.2](apple/imac/14-2) | `<nixos-hardware/apple/imac/14-2>` |
| [Apple iMac 18.2](apple/imac/18-2) | `<nixos-hardware/apple/imac/18-2>` |
| [Apple MacBook Air 3,X](apple/macbook-air/3) | `<nixos-hardware/apple/macbook-air/3>` |
| [Apple MacBook Air 4,X](apple/macbook-air/4) | `<nixos-hardware/apple/macbook-air/4>` |
Expand Down
62 changes: 62 additions & 0 deletions apple/imac/14-2/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# iMac 18,2, NixOS 24.05 (2024)

## Audio
- [x] ok

## Bluetooth
- [x] ok

## Thunderbolt
- [x] ok

## SATA
- [x] ok

## NVME
- [x] ok

## Suspend/Resumer
- [x] ok

## Wifi
- [x] The module `wl` needs to be unloaded and reloaded to get wifi working (`sudo modprobe -r wl; sudo modprobe wl`)
I wish a workaround could be found for this.

## Graphics
- [x] Latest unsupported Nvidia drivers available are 390.157, working with Kernel 6.10.6.

## LSPCI

```
❯ lspci
00:00.0 Host bridge: Intel Corporation 4th Gen Core Processor DRAM Controller (rev 06)
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor PCI Express x16 Controller (rev 06)
00:14.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB xHCI (rev 05)
00:16.0 Communication controller: Intel Corporation 8 Series/C220 Series Chipset Family MEI Controller #1 (rev 04)
00:1b.0 Audio device: Intel Corporation 8 Series/C220 Series Chipset High Definition Audio Controller (rev 05)
00:1c.0 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #1 (rev d5)
00:1c.2 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #3 (rev d5)
00:1c.3 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #4 (rev d5)
00:1c.4 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #5 (rev d5)
00:1f.0 ISA bridge: Intel Corporation Z87 Express LPC Controller (rev 05)
00:1f.2 SATA controller: Intel Corporation 8 Series/C220 Series Chipset Family 6-port SATA Controller 1 [AHCI mode] (rev 05)
00:1f.3 SMBus: Intel Corporation 8 Series/C220 Series Chipset Family SMBus Controller (rev 05)
01:00.0 VGA compatible controller: NVIDIA Corporation GK104M [GeForce GTX 775M Mac Edition] (rev a1)
01:00.1 Audio device: NVIDIA Corporation GK104 HDMI Audio Controller (rev a1)
02:00.0 Non-Volatile memory controller: Samsung Electronics Co Ltd NVMe SSD Controller SM981/PM981/PM983
03:00.0 Network controller: Broadcom Inc. and subsidiaries BCM4360 802.11ac Dual Band Wireless Network Adapter (rev 03)
04:00.0 Ethernet controller: Broadcom Inc. and subsidiaries NetXtreme BCM57766 Gigabit Ethernet PCIe (rev 01)
04:00.1 SD Host controller: Broadcom Inc. and subsidiaries BCM57765/57785 SDXC/MMC Card Reader (rev 01)
05:00.0 PCI bridge: Intel Corporation DSL3510 Thunderbolt Controller [Cactus Ridge 4C 2012] (rev 03)
06:00.0 PCI bridge: Intel Corporation DSL3510 Thunderbolt Controller [Cactus Ridge 4C 2012] (rev 03)
06:03.0 PCI bridge: Intel Corporation DSL3510 Thunderbolt Controller [Cactus Ridge 4C 2012] (rev 03)
06:04.0 PCI bridge: Intel Corporation DSL3510 Thunderbolt Controller [Cactus Ridge 4C 2012] (rev 03)
06:05.0 PCI bridge: Intel Corporation DSL3510 Thunderbolt Controller [Cactus Ridge 4C 2012] (rev 03)
06:06.0 PCI bridge: Intel Corporation DSL3510 Thunderbolt Controller [Cactus Ridge 4C 2012] (rev 03)
07:00.0 System peripheral: Intel Corporation DSL3510 Thunderbolt Controller [Cactus Ridge 4C 2012] (rev 03)
```

## Links

- https://support.apple.com/en-us/111970
- https://everymac.com/ultimate-mac-lookup/?search_keywords=iMac14,2
49 changes: 49 additions & 0 deletions apple/imac/14-2/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
config,
lib,
pkgs,
...
}:
{
imports = [
../.
../../../common/gpu/intel
../../../common/gpu/nvidia
../../../common/hidpi.nix
];

boot = {
initrd.availableKernelModules = [
"nvme"
"sd_mod"
"thunderbolt"
"usb_storage"
"xhci_pci"
];
initrd.kernelModules = [
"applesmc"
"applespi"
"intel_lpss_pci"
"spi_pxa2xx_platform"
"kvm-intel"
];
blacklistedKernelModules = [
"b43"
"ssb"
"brcmfmac"
"brcmsmac"
"bcma"
];
kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "6.0") pkgs.linuxPackages_latest;
extraModulePackages = [ config.boot.kernelPackages.broadcom_sta ];
};

# Wifi, CPU Microcode FW updates
networking.enableB43Firmware = lib.mkDefault true;
hardware = {
enableRedistributableFirmware = lib.mkDefault true;
cpu.intel.updateMicrocode = lib.mkDefault true;
};

hardware.bluetooth.enable = true;
}
3 changes: 2 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
in {
acer-aspire-4810t = import ./acer/aspire/4810t;
airis-n990 = import ./airis/n990;
apple-imac-14-2 = import ./apple/imac/14-2;
apple-imac-18-2 = import ./apple/imac/18-2;
apple-macbook-air-3 = import ./apple/macbook-air/3;
apple-macbook-air-4 = import ./apple/macbook-air/4;
apple-macbook-air-6 = import ./apple/macbook-air/6;
Expand All @@ -17,7 +19,6 @@
apple-macbook-pro-12-1 = import ./apple/macbook-pro/12-1;
apple-macbook-pro-14-1 = import ./apple/macbook-pro/14-1;
apple-macmini-4-1 = import ./apple/macmini/4;
apple-imac-18-2 = import ./apple/imac/18-2;
apple-t2 = import ./apple/t2;
asus-battery = import ./asus/battery.nix;
asus-ally-rc71l = import ./asus/ally/rc71l;
Expand Down

0 comments on commit a2f4c10

Please sign in to comment.