Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

NixOS installation guide

From posixlycorrect wiki
Revision as of 21:16, 30 August 2024 by Admin (talk | contribs) (Created page with "Category:Technical guides = introduction = this uses flakes # obtain nixos ISO (graphical installer is nicer i guess) # boot it # open up a terminal and partition disk # wipe your disk: blkdiscard /dev/nvme0n1 = partition your disk = # create boot partition # create root partition # parted <device> # mklabel gpt # mkpart partitoin name? boot file system type? fat32 start? 0% end? 2GB # mkpart partitoin name? root file system type? btrfs start? 2GB end? 100% # set 1...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


introduction

this uses flakes

  1. obtain nixos ISO (graphical installer is nicer i guess)
  2. boot it
  3. open up a terminal and partition disk
  4. wipe your disk: blkdiscard /dev/nvme0n1

partition your disk

  1. create boot partition
  2. create root partition
  3. parted <device>
  4. mklabel gpt
  5. mkpart

partitoin name? boot file system type? fat32 start? 0% end? 2GB

  1. mkpart

partitoin name? root file system type? btrfs start? 2GB end? 100%

  1. set 1 esp on
  2. set 1 boot on
  3. quit
  4. mkfs.btrfs /dev/<root partition>
  5. mkfs.vfat -F32 /dev/<boot partition>

mount your disk

  1. mount /dev/<root partition> /mnt
  2. mkdir /mnt/boot
  3. mount /dev/<boot partition> /mnt/boot

generate config

sudo nixos-generate-config --root /mnt nvim /mnt/etc/nixos/configuration.nix nvim /mnt/etc/nixos/hardware-configuration.nix

install

sudo nixos-install