Mobile NixOS Development Log (1)

I'm not sure what shape those update will take. Let's see what sticks.

Follow-up to the last announcement

The last post was shared around, but I haven't taken the time yet to answer some questions. I wanted to take time to better answer the questions. Thanks for the kind words all around!

First off, by design the project does not target a specific phone or device. This is to ensure it's not tightly coupled to a specific phone. After all, this is more about making the building blocks you will use to make it work on your own device. Though, just like some other projects, not all phones will be supported in equal manners.

As the projects aims more at being building blocks, there is no “GUI I plan to put on the phone”. The intention is not to make a vertically integrated solution like LuneOS or UBports, but to let the end-user freely pick their environment, like they do on NixOS. In other words, closer to the way postmarketOS operates. Though, there will likely be a chosen environment that will be the main supported one.

A non-obvious detail is that this is not a new distribution, nor is it a fork. A system built with Mobile NixOS ends up using the Nixpkgs packages set, and the NixOS module system. This is a composition on top of NixOS! The project is built mainly to create the required boot environment, add the necessary packages for the devices, and add the necessary options for the devices. Mobile NixOS will have a different stage-1, but it is expected that from stage-21 it will be built using all upstream NixOS components.

What did I do?

In the time since the announcement, I have done some unrelated work. Mostly picking up loose threads like finishing up the new packages page for the NixOS website. There is also ongoing work on improving the Nixpkgs and NixOS documentation that will soon be publicized.

Though, this is not what's interesting. I have been working on a new infrastructure to build disk and filesystem images. The next development log will focus on that. There's too much to say in this already long post, and there are some details that need to be finalized before writing about them.

  1. This was glossed over in the last post. NixOS calls the initramfs steps stage-1. The stage-1 init then hands off to stage-2. stage-2 is what ends up execing into systemd. You could substitute stage-1 to initramfs and stage-2 to init and be mostly right.