Skip to content

Instantly share code, notes, and snippets.

@ramirez7
Last active March 14, 2022 20:52
Show Gist options
  • Select an option

  • Save ramirez7/e3f9fa603eee0ac58f3db356ed19161d to your computer and use it in GitHub Desktop.

Select an option

Save ramirez7/e3f9fa603eee0ac58f3db356ed19161d to your computer and use it in GitHub Desktop.

Tested on a System76 Lemur Pro.

  1. Download installation iso onto USB
    • sudo dd if=~/Downloads/nixos-plasma5-21.11.335288.3ddd960a3b5-x86_64-linux.iso of=/dev/sdc1
      • Make sure the output is the right device!
    • I used the KDE Plasma graphical image.
  2. Boot laptop into it
    • Hold ESC on startup according to this
    • Select "One Time Boot" and "Boot from USB".
    • That boots into grub. Was able to boot into the live usb with some commands from this blog
      • ls and find the drive formatted as msdos1 to identify the USB.
      • set root=(hd0,msdos1) This was the name of the drive for me.
      • ls / should show the contents of the NixOS iso. /EFI/boot/bootx64.efi is what we're looking for.
      • chainloader /EFI/boot/bootx64.efi
      • boot and you will be brought into the NixOS graphical image.
    • Apparently it shouldn't be booting into grub. Should file an issue
  3. Connect to Ethernet via USB-C Ethernet adapter or wifi via nmtui in Konsole.
    • I confirmed my USB-C adapter works. I ran into this issue. Some small configuration.nix changes will fix the resulting slow startup.
  4. Run nixos-up
    • I specifically used this rev: nix-shell https://github.com/samuela/nixos-up/archive/525a5cefd676d8686adf08bb4a49294f8a1df7c5.tar.gz
  5. Edit /mnt/etc/nixos/configuration.nix a bit.
    • networking.networkmanager.enable = true;
      • If you don't do this, you'll be in a tough spot when you boot into NixOS.
    • hardware.bluetooth.enable = true;
    • nixpkgs.config.allowUnfree = true;
    • Add a few programs too (emacs, curl, google-chrome)
  6. sudo nixos-install
    • Note: If you bork your NixOS to the point where you can't sudo nixos-rebuild switch (e.g. can't get network access), you can boot from USB again, edit /mnt/etc/nix/configuration.nix and sudo nixos-install again. It's built to be re-runnable.
  7. Restart and you'll boot into NixOS!

Future considerations:

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