Skip to content

Instantly share code, notes, and snippets.

@ldesgoui
Created September 8, 2018 08:07
Show Gist options
  • Save ldesgoui/a5602a507884ad5770741cf37f6eb7ca to your computer and use it in GitHub Desktop.
Save ldesgoui/a5602a507884ad5770741cf37f6eb7ca to your computer and use it in GitHub Desktop.
NixOS on ASUS Transformer T100TAF
# This is a "literal" shell script, you only should grab commands, it's not meant to be run.
# First, grab an i686 iso from https://nixos.org/nixos/download.html, flash it on an USB
# Reboot the T100TAF and mash F2 when the backlight is lit up, this should get you to BIOS
# In there, make sure EFI boot is enabled and disable secure boot, save then boot from USB
# Follow UEFI instructions from https://nixos.org/nixos/manual/index.html#sec-installation
# The WiFi card won't be detected, you'll need to run
mkdir -p /lib/firmware/brcm
cp /sys/firmware/efi/efivars/nvram-* /lib/firmware/brcm/brcmfmac43340-sdio.txt
rmmod brcmfmac
modprobe brcmfmac
# Your first config should probably as minimal as possible to download and build the least
# Remove the line containing `boot.loader.systemd-boot.enable = true` and add
boot.loader.grub.enable = true;
boot.loader.grub.efiSupport = true;
boot.loader.grub.device = "nodev";
hardware.enableAllFirmware = true;
nixpkgs.overlays = [(self: super: { inherit (pkgs.pkgsi686Linux) grub2_efi; })];
# After your initial boot, repeat the steps to detect the WiFi card, it will work fine from now on
# We'll switch to using a 64 bit kernel now, in /etc/nixos/configuration.nix, add
boot.kernelPackages = (import <nixpkgs> { system = "x86_64-linux"; }).linuxPackages;
# Run `sudo nixos-rebuild boot`, reboot, then remove that line and add:
nixpkgs.system = "x86_64-linux";
# If you're lucky, you'll manage to build without tripping into build errors
# If not, get hold of another x86_64 computer and build using `--build-host <THE OTHER COMPUTER>`
# You should be running a x86_64 NixOS with i686 grub2 on your T100TAF.
# Note: Other ASUS T100 units should work just the same,
# the only different part should be the brcm firmware file,
# just run `dmesg | grep brcm | grep -- -2`,
# this should give you a filename like brcmfmac43340-sdio.txt,
# all you need to do then is to rename it accordingly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment