Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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