Skip to content

Instantly share code, notes, and snippets.

@dmjio
Created January 10, 2016 02:44
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save dmjio/235b39aa8f8e0d436fc2 to your computer and use it in GitHub Desktop.
Save dmjio/235b39aa8f8e0d436fc2 to your computer and use it in GitHub Desktop.
Install NixOS on an iMac / Macbook
# NixOS manual
nixos.org/nixos/manual/
# GET ETHERNET / WIRED INTERNET FIRST
# Prepare USB stick - dependent on machines - this worked for an iMac
http://superuser.com/questions/795879/how-to-configure-dual-boot-nixos-with-mac-os-x-on-an-uefi-macbook
# Prepare hard disk via Disk Utility on OSX beforehand (for multiple oses)
# Reboot with usb stick (Option on load)
# Prepare disk
mkswap -l swap /dev/sdxN
mkfs.ext4 -l nixos /dev/sdxN
mkfs.ext4 -l home /dev/sdxN
# Mount volumes
swapon /dev/disk/by-label/swap
mount /dev/disk/by-label/nixos /mnt
mkdir /mnt/home
mkdir /mnt/boot
mount /dev/disk/by-label/EFI /mnt/boot
mount /dev/disk/by-label/home /mnt/home
# Generate config
nixos-generate-config --root /mnt
# Fix the boot.extraModulePackages option in the generated /mnt/etc/nixos/hardware-configuration.nix file.
# Remove the double quotes in the following line if present (apparently caused by a bug in nixos-generate-config )
boot.extraModulePackages = [ config.boot.kernelPackages.broadcom-sta ];
# Enable allowUnfree in configuration.nix file. Add the following
nixpkgs.config.allowUnfree = true;
# Install
nixos-install
# Reboot
reboot
# Login with root and add a passwd
# Start with /etc/configuration.nix (add users etc there)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment