nix: Remove ability to build pindakaas SD image

The idea to create an image burnable on a SD card that is already
configured is a nice one, however I encountered many issues:

- Used something that was designed to be an installer:
    - Cannot change from unencrypted ext4 partition (AFAICS)
    - Comes with installer tools (i.e. tools for various filesystems),
      which creates conflicts
- Takes a lot of space and time to build, had to put /tmp on a non-tmpfs
- Has to extend the filesystem manually afterwards
- I think it rebuilt the full system on nixos-rebuilt anyways. Maybe
  because I used binfmt compilation? Could also be because installer has
  some overlays.

Since I had nix on Manjaro already, I surely could have built the
system directly on the SD card from there. Maybe that's what I will do
to test the partitionning/boot scheme setup actually.
This commit is contained in:
Geoffrey Frogeye 2023-11-23 13:42:52 +01:00
parent 55f2304223
commit 86f225ea67
Signed by: geoffrey
GPG key ID: C72403E7F82E6AD8
2 changed files with 0 additions and 24 deletions

View file

@ -1,22 +0,0 @@
#/usr/bin/env sh
# Build a disk image for testing on pindakaas via sd card
if ! command -v nom-build
then
exec nix-shell -p nix-output-monitor --run $0
fi
extra=""
if [ "$(uname -m)" != "aarch64" ]
then
if [ ! -f /proc/sys/fs/binfmt_misc/qemu-aarch64 ]
then
echo "Use binfmt QEMU!"
echo "https://nixos.wiki/wiki/NixOS_on_ARM#Compiling_through_binfmt_QEMU"
exit 1
fi
extra="--argstr system aarch64-linux"
fi
nom-build '<nixpkgs/nixos>' -A config.system.build.sdImage \
-I nixos-config=./pindakaas.nix $extra --show-trace

View file

@ -2,11 +2,9 @@
{
imports = [
<nixos-hardware/pine64/pinebook-pro>
<nixpkgs/nixos/modules/installer/sd-card/sd-image-aarch64.nix>
./os/loader.nix
];
# nixos-hardware use latest kernel by default. This obviously runs quickly out of sync with zfs packages.
# zfs packages are included despite me asking anything zfs, probably they're in the image for installation purposes?
boot.kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages;
networking.hostName = "pindakaas";