| I used a pre-build image from Hydra. The mobile-nixos project site links to their Hydra jobs: https://hydra.nixos.org/jobset/mobile-nixos/unstable That links to the latest build for pinephone aarch64, e.g. https://hydra.nixos.org/build/164693256 That gives the output path, e.g. /nix/store/6py525nywqdbyjs7jy1rm9vw53hmm5f1-pine64-pinephone_full-disk-image.img We can look up that hash on cache.nixos.org, e.g. https://cache.nixos.org/6py525nywqdbyjs7jy1rm9vw53hmm5f1.nar... That gives us the download URL, e.g. https://cache.nixos.org/nar/087ljdm30k8wqgdhdjdhc15bmkk01g69... We can unxz that, then trim the leading bytes according to the Nar file format (described in Dolstra's PhD thesis, figure 5.2, page 93 https://edolstra.github.io/pubs/phd-thesis.pdf ). Since this .nar only contains one file, we can just ignore the header bytes (they're padded to multiples of 8 bytes; I think in this case we need to skip the first 96 bytes). We can do this while dd-ing the image to our SD card, e.g. sudo dd if=087ljdm30k8wqgdhdjdhc15bmkk01g69zqvr3gv13sra8pkgk387.nar of=/dev/my-sd-card bs=96 skip=1
This is quite convoluted, but I did this while stuck on a crappy Chromebook ;)Note that the above images have no usable user accounts. I mounted the resulting SD card and edited the /etc/shadow file to enable root login without a password. I could then log in to a text console, using an external keyboard :) |