this is a simple example mobile-nixos config, with phosh, using Nix Flakes, which can be:
-
used to generate a disk image which can be flashed / written to an SD card and booted
-
built on a Pinephone, ideally making use of a local
aarch64
binary cache / builder machine, so that the Pinephone doesn’t have to rebuild itself
I did minor packaging work here - all credit for the actual implementation is due to @zhaofengli, from this PR (mobile-nixos/mobile-nixos#352), and to all of the mobile-nixos contributors.
🙇
nix build .#pinephone-disk-image --impure
this can then be written to an SD card with dd
.
I didn’t bother to modularize the HM config out of the flake, so the disk image will lack that config for defaultUserName
.
however that could be rewritten, or one could just run the below commands inside of the Pinephone NixOS terminal, in order to rebuild the system with the full HM user config.