···2222 IMG=$ARTIFACT
2323fi
24242525+# bail out if we failed to build the thing
2626+if [ $IMG = "" ]; then
2727+ echo "error: Something went wrong while building the SD image, check logs"
2828+ exit 1
2929+fi
3030+2531echo "Found img file: $IMG"
26322733mkdir -pv /build/out || true
+4-2
hosts/raspi-base/sd-image.nix
···55 <nixpkgs/nixos/modules/installer/cd-dvd/sd-image-aarch64.nix>
66 ./sd-image-init.nix
77 ];
88+ system.stateVersion = "24.11";
89910 # bzip2 compression takes loads of time with emulation, skip it. Enable
1011 # this if you're low on space.
1112 sdImage.compressImage = false;
12131314 sdImage.populateRootCommands = ''
1515+ pwd # just in case
1416 mkdir -p ./files/etc/sd-image-metadata/
1515- cp ./configuration.nix ./files/etc/sd-image-metadata/configuration.nix
1616- cp ./sd-image-init.nix ./files/etc/sd-image-metadata/sd-image-init.nix
1717+ cp /build/src/configuration.nix ./files/etc/sd-image-metadata/configuration.nix
1818+ cp /build/src/sd-image-init.nix ./files/etc/sd-image-metadata/sd-image-init.nix
1719 '';
18201921 # OpenSSH is forced to have an empty `wantedBy` on the installer system[1], this won't allow it