Skip to content

Instantly share code, notes, and snippets.

@mbbx6spp
Last active July 15, 2018 17:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mbbx6spp/1c84554cf95fc1723b864ae16b766ba6 to your computer and use it in GitHub Desktop.
Save mbbx6spp/1c84554cf95fc1723b864ae16b766ba6 to your computer and use it in GitHub Desktop.
Some thoughts on improving the NixOS Installation experience

NixOS Installer Ideas

Background

I recently installed NixOS from scratch on a new device and since I haven’t needed to do this in 1.5 years I forgot the sequence needed and made a whole bunch of mistakes.

It would be nice to be able to improve the experience and guide the user. On the other end of the installer UX are assisted installers which often use insecure defaults (e.g. for partitioning, or default passwds, etc).

nixos-help is potentially a valuable tool here but the documentation could use some attention in terms of organization, flow, and ensuring the documentation is updated to the current release of NixOS it is shipped with.

As an aside: as someone that once built terminal UI based installers previously, maintaining an installer that covers all cases seems like a large maintenance overhead on the NixOS community since it would then become a critical part of the distribution that requires a lot of manual and community testing.

Assumptions/Goals

I assume:

  • we do not want to add much, if any dependencies to the USB install image.
  • we do not have bandwidth to maintain a fully assisted install experience that covers most basic install paths
  • we want to provided a more guided user experience to those installing NixOS to reduce errors

Meeting in the middle

Right now, the NixOS install process is pretty on-your-own. It would be nice to provide a little more guidance without being too prescriptive.

How can we offer this guidance without needing to build an assisted installer, and not adding install image bloat while still offering a more directed/guided UX?

Here are my suggestions in no particular order, and unless otherwise mentioned are not exclusive to each other:

  • create a nixos-install-help command that pulls up just streamlined install documentation, update the installer text to reference nixos-install-help instead of nixos-help.
  • create a nixos-install-simple-insecure command that prompts the user for partition for root /, the /boot partition, which will result in a simple, unencrypted basic partition with a basic NixOS installed over the original partition (thus destroying the data on that root partition).
  • create a nixos-install-simple-encrypted which is the same as directly above, but will encrypt the partition to be used for the root partition.
  • create a nixos-guided-installer command that offers a screen split pane session (horizontally divided) with install docs shown in the top pane (running nixos-install-help) and a shell prompt in the bottom screen pane (bash) with a message describing how the user navigate between the panes.

Thoughts????

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