the nixos installation process is really bad and i don’t think it has to be

NixOS is well-known for being user-hostile, and installation is the worst. Let’s look at a typical installation:

  1. We go to the NixOS manual, not to be confused with the Nix manual (for the Nix package manager specifically) or the Nixpkgs manual (for the Nix packages architecture and de-facto standard library for the Nix expression language).

  2. We are greeted with a table of contents 3500px tall, which we scroll past.

  3. We get to part 1, chapter 1, “Obtaining NixOS”, which immediately tells us that to make a bootable USB drive we need to go to section 2.5.1 — that’s part 1, chapter 2, section 5 (“additional installation notes”), subsection 1 (“booting from a USB drive”).

    1. Why is booting from a USB drive — how nearly every desktop or laptop Linux installation is performed — treated by the manual as of equal importance to PXE netboot and VirtualBox installations?

    2. Why is the first step in “Obtaining NixOS” an indirection to the middle of “installing NixOS”? Shouldn’t creating installation media come before installation? Is a bootable USB drive really worth relegating to “Additional installation notes”? The Fedora project offers a bootable USB creator for Windows and MacOS, and bootable ISOs for Linux.

  4. Okay, we go through and make our bootable USB and boot from it. Now we’re instructed to run systemctl start display-manager to start the graphical environment. Shouldn’t the graphical environment start itself, if it’s available? Again, no other distro makes you have to know the command to start the display manager.

  5. Next we’re told we’ll need networking to run the installer, which gives us a whole host of conflicting commands to run:

    • “check ip a” to see if networking is up, but no explanation what successful/unsuccesful output looks like.
    • If we don’t have a DHCP server on our network, “configure networking manually using ifconfig” (no mention of man ifconfig)
    • On the graphical installer we can configure the network through “NetworkManager”. (Is that a command-line program to run?)
    • In non-graphical settings we are told we can use nmtui to configure NetworkManager.
    • To configure the network manually (like it said to do with ifconfig?) we’re told to run systemctl stop NetworkManager.
    • If NetworkManager is not available, configure with sudo systemctl start wpa_supplicant && wpa_cli, and then shows commands that are sufficient for “most home networks”.
  6. Then we walk through manually partitioning. We can use any of parted, fdisk, gdisk, cfdisk, and cgdisk! Again, the manual expects us to be an expert and know which one is best for our use-case.

  7. I could go on. The manual also expects us to decide between UEFI/GPT or BIOS/MBR, we need to configure swap, we need to edit a text file on the command-line…

Throughout the process, the NixOS manual expects every user to be an expert and requires a lot of decisions in response to the current environment (e.g. “in the graphical installer, do this, otherwise, do this…”).

I propose writing a tool which can perform the bulk of these steps (configuring the network, partitioning disks, generating a configuration.nix) automatically or with minimal user input, like a wizard.

Will I do something about this myself? Perhaps, perhaps.