Skip to content

Instantly share code, notes, and snippets.

@curiousleo
Last active March 20, 2020 16:21
Show Gist options
  • Save curiousleo/b06e65a6e6ce94b8778906b96c922377 to your computer and use it in GitHub Desktop.
Save curiousleo/b06e65a6e6ce94b8778906b96c922377 to your computer and use it in GitHub Desktop.
How to set up a new laptop with NixOS

How to set up a new laptop with NixOS

Set up installation medium

  • Download latest NixOS image: https://nixos.org/nixos/download.html

  • Use lsblk to find the right block device, then copy it over using dd

    $ sudo lsblk
    $ sudo dd bs=4M if=${image.iso} of=${/dev/sdx} status=progress oflag=sync

Install NixOS

  • Follow these installation instructions: https://grahamc.com/blog/nixos-on-dell-9560 with the following changes:
    • Activate UEFI before booting into the installation medium
    • Check you're in UEFI mode via ls /sys/firmware/efi/efivars/
    • Create the "key" partition to be 17MiB (16MiB header + 1MiB key): https://askubuntu.com/a/1185737/1011907
    • Just create a user during the installation by recording the output of the following command in hashedPassword:
      $ mkpasswd -m sha-512
    • If you're doing the installation from a WiFi network with a captive portal, make sure you have a browser installed after reboot so you can log in!

Set up configuration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment