Why is there no "installer" for NixOS?

I think it would be a pretty cool user experience to have something like GitHub - nix-gui/nix-gui: Use NixOS Without Coding as part of the installer.

A guided installation would be:

  • Grub installer / memtest menu
  • “Kiosk” calamares installer pages:
    • Select language / timezone
    • Guided partition editor + filesystem support
    • Select Nix channel?
      • latest stable (default)
      • unstable
    • run: attempt channel update
    • run: nixos-generate-config
    • run: Nixos-hardware step?
    • Nix-gui-like configuration editor
    • run: nixos-install step
    • Prompt: Continue exploring on DE, nixos-enter, or restart
9 Likes

Sorry for the slow reply, been off keys for a while getting the house ready for a new child. I have been reading all the messages on my phone, so thanks for those posting.

Just a quick update, I’m in the process of writting some prototypes, i.e. udev to detect all disk, LVM integration, CryptSetup integration, parted integration and some basic UI concepts. Nothing particularly useful at the moment, but trying to split the core functions into a library to implement both a CLI and GUI version (i.e. headless server installs using ncurses or similar and graphical / desktop install maybe using QT).

I still need to find a way to extract / make searchable all the nixos configuration options programatically. I’m still needing to poke the ZFS implementation a bit too. Those will be the last prototypes before I start architecting an implementation.

I’ll post some more as progress is made.

2 Likes

Just to chime in, I wouldn’t mind a graphical installer.
Especially for the initial partitioning and encryption, like many others I wrote my own script for that.
Maybe it could support Flakes as well, e.g. you can provide it the URL and it will install it. Not a huge task to do on the command line but might be handy.

2 Likes

I love the idea of a graphical installer for NixOS. Depending on its implementation it would allow different kinds of people to get into NixOS faster.

In my opinion, there are a lot of ways to go about this with two extreme cases:

  • Completely hide all of the nix expressions behind a GUI.
    • This would help a lot of people who are interested in NixOS’ qualities as a bulletproof distro, but have little interest in cracking open an editor and dealing with syntax errors and documentation.
  • Guide the user in crafting their own nix configuration.
    • This would be very helpful to people who want to get their feet wet but are not ready to make the upfront investment of reading the docs before they jump right in.

I am a strong believer in the second approach, because that one matches my personality. I imagine that having a step-by-step wizard that displays the resulting nix expressions on every step, linked to all the relevant documentation would have gotten me to NixOS sooner.

If anyone is working on an installer with an emphasis on “in your face” nix expressions and tutoring the user, I would be interested to help.

PS: on a related subject, anyone can recommend a tool/library that can parse and update a nix configuration file while keeping it in a readable form?

1 Like

nixfmt and rnix-lsp contain some prior art in that direction, I think.

2 Likes

I’ve found some success using rnix-parser in a small tool I’m working on called nix-editor. So far my plan with it is to use it as a stepping stone to more user friendly ways of editing nixos configuration files. I was thinking of something along the lines of Gnome’s dconf-editor that would keep the structure of a nixos configuration while being more user friendly. I also did look at nixui, when I started using nixos a few months ago, but found it to be not very easy to pick up or use.

I did some more work on my calamares modules and was able to get most of the basic features working, including configuring boot for both bios and efi systems, encrypted disks, and autologin. I also tested fresh installations using a modified iso image and it was able to install nixos without any issues, however, I agree with the general sentiment that given the lack of other graphical tools, new users would have no idea how to proceed after the installation was completed.

4 Likes

Can you share the ISO for testing?

What are the next steps? Should we wait to publish the graphical installer until we have a graphical configuration tool or can we say these are two separate tasks that we can improve one after another?

The manual has chapters for installation and changing configuration: NixOS 23.11 manual | Nix & NixOS

If we can replace reading the installation chapter with an intuitive tool, i think that’s a great improvement we should publish.

3 Likes

Here’s a link to an iso for testing: nixos-22.05.git.4b46a593ef0M-x86_64-linux.iso
sha256: 876c96c32e0156ef7c5391567a715744de7cfbca66a9141ed1ff1ad5b2e69e23
The iso was built against this file on my nixpkgs fork: installation-cd-graphical-calamares-gnome.nix

And as for when to publish, I think that this could be used without other tools for the time being, and I think could be helpful for some people. But my only concern would be users installing NixOS possibly without even reading the manual, and then being lost on what to do.

5 Likes

That could be remedied by making sure the installer points the user to the installation instructions, possibly on first boot so that they have a reference to hand.

Currently such users cannot install NixOS anyway, so this isn’t really a regression.

3 Likes