Skip to content

Latest commit

 

History

History
48 lines (32 loc) · 1.32 KB

File metadata and controls

48 lines (32 loc) · 1.32 KB

pinephone-mobile-nixos-flake-example


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.

🙇

building the disk image

nix build .#pinephone-disk-image --impure

this can then be written to an SD card with dd.

caveats

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.

resizing partitions

use cfdisk and resize2fs.

building the system config

# just testing, not replacing current generation
nixos-rebuild build --flake .#pinephone

or

# replace current generation
ln -sr ./flake.nix /etc/nixos
nixos-rebuild switch