Created
April 18, 2016 16:56
-
-
Save mguzelevich/1c63a9c98b554c1663c252386ed0adc2 to your computer and use it in GitHub Desktop.
Install NixOS on an iMac / Macbook
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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