From e5cc44520fecf4b257f33cd6acf615d528c2a110 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Thu, 20 Oct 2016 14:53:52 -0400 Subject: [PATCH] Apple MacBook Pro 10,1 --- apple/macbook-pro-10-1.nix | 41 +++++++++++++++++++++++++++++++++++++ apple/macbook-pro-10-1.wiki | 9 ++++++++ 2 files changed, 50 insertions(+) create mode 100644 apple/macbook-pro-10-1.nix create mode 100644 apple/macbook-pro-10-1.wiki diff --git a/apple/macbook-pro-10-1.nix b/apple/macbook-pro-10-1.nix new file mode 100644 index 0000000..f9ba24d --- /dev/null +++ b/apple/macbook-pro-10-1.nix @@ -0,0 +1,41 @@ +{ config, pkgs, ... }: + +{ + imports = + [ ../lib/kernel-version.nix + ]; + + ## BEGIN from generated hardware-configuration + ## Probably better to just use a freshly generated hardware.configuration.nix + ## than this, but including for reference. + #imports = + # [ + # ]; + # + #boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usbhid" "sd_mod" "sdhci_pci" ]; + #boot.kernelModules = [ "kvm-intel" "wl" ]; + #boot.extraModulePackages = [ config.boot.kernelPackages.broadcom_sta ]; + # + #nix.maxJobs = lib.mkDefault 8; + ## END from generated hardware-configuration + + # Use the systemd-boot efi boot loader. (From default generated configuration.nix) + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + # I use this but not sure whether its needed. + # Right click does *NOT* work + services.xserver.libinput.enable = true; + + kernelAtleast = + [ { version = "4.7"; msg = "Broadcom WiFi confirmed not to work."; } + ]; + + # Couldn't get X to work with nvidia + # Also, PTYs don't work after X/nvidia starts + services.xserver.videoDrivers = [ "nvidia" ]; + hardware.opengl.driSupport32Bit = true; + + # Seems to improve battery life *and* keep the CPU cooler + services.mbpfan.enable = true; +} diff --git a/apple/macbook-pro-10-1.wiki b/apple/macbook-pro-10-1.wiki new file mode 100644 index 0000000..149b30e --- /dev/null +++ b/apple/macbook-pro-10-1.wiki @@ -0,0 +1,9 @@ += Apple MacBook Pro 10,1 = + +I presume the associated configuration also will work with to other 10,x models. + +If you don't have an Ethernet adapter, make sure your NixOS installer has a sufficiently modern kernel or you will be stuck without internet and unable to installer. + +Note that (with NixPkgs circa late October 2016) Linux 4.8.1 does not work: everything will boot through X, but then manually-run commands accessing peripherals (nmcli, lspci, etc) will hang inexplicably. + +Thankfully no tweaking of the BIOS or similar was needed. Do note that if your MacOS partition is encrypted, you will have an easier time shrinking it from within MacOS, but this is standard advice.