From 86f225ea679012a1c9dfad7eaa47535e921d21b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Geoffrey=20=E2=80=9CFrogeye=E2=80=9D=20Preud=27homme?= Date: Thu, 23 Nov 2023 13:42:52 +0100 Subject: [PATCH] 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. --- config/nix/build-pindakaas-image.sh | 22 ---------------------- config/nix/pindakaas.nix | 2 -- 2 files changed, 24 deletions(-) delete mode 100755 config/nix/build-pindakaas-image.sh diff --git a/config/nix/build-pindakaas-image.sh b/config/nix/build-pindakaas-image.sh deleted file mode 100755 index e48ebd1..0000000 --- a/config/nix/build-pindakaas-image.sh +++ /dev/null @@ -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 '' -A config.system.build.sdImage \ - -I nixos-config=./pindakaas.nix $extra --show-trace diff --git a/config/nix/pindakaas.nix b/config/nix/pindakaas.nix index fd4f437..7fbef93 100644 --- a/config/nix/pindakaas.nix +++ b/config/nix/pindakaas.nix @@ -2,11 +2,9 @@ { imports = [ - ./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";