Update raspberry pi builds

This commit is contained in:
NeilClack
2026-09-30 12:04:37 -05:00
parent c18e158b69
commit e6138d398d
3 changed files with 31 additions and 27 deletions
+6 -3
View File
@@ -6,16 +6,19 @@ TIMESTAMP=$(date +"%Y-%m-%d_%H-%M-%S")
FILENAME="radiantwave-raspberrypi-${TIMESTAMP}.img.zst"
REPO="$(pwd)"
NIX_STORE="kiosk-nix-store"
NIX_STATE="kiosk-nix-state"
echo "==> Building ${CONFIG}..."
echo "==> Output: ${REPO}/${FILENAME}"
echo ""
podman volume create "${NIX_STORE}" 2>/dev/null || true
podman volume create "${NIX_STATE}" 2>/dev/null || true
podman run --rm \
-v "${REPO}:/repo" \
-v "${NIX_STORE}:/nix/store" \
-v "${NIX_STATE}:/nix/var/nix" \
-w /repo \
nixos/nix:latest \
sh -c '
@@ -23,8 +26,8 @@ podman run --rm \
mkdir -p /etc/nix
echo "experimental-features = nix-command flakes" > /etc/nix/nix.conf
echo "accept-flake-config = true" >> /etc/nix/nix.conf
echo "extra-substituters = https://cache.nixos.org https://nixos-raspberrypi.cachix.org" >> /etc/nix/nix.conf
echo "extra-trusted-public-keys = nixos-raspberrypi.cachix.org-1:4iMO9LXa8BqhU+Rpg6LQKiGa2lsNh/j2oiYLNOQ5sPI=" >> /etc/nix/nix.conf
echo "extra-substituters = https://cache.nixos.org https://nixos-raspberrypi.cachix.org https://attic.radiantwavetech.com/radiantwave https://attic.radiantwavetech.com/radiantwave-dev" >> /etc/nix/nix.conf
echo "extra-trusted-public-keys = nixos-raspberrypi.cachix.org-1:4iMO9LXa8BqhU+Rpg6LQKiGa2lsNh/j2oiYLNOQ5sPI= radiantwave:QADrjpBWJssTZ3KmiZtcWEf4uAm66oOlHmtQI3jkrgA= radiantwave-dev:B8FhLu3MQ9JfeEIHIKNrKxnP+3akzzkqMbTZR4hRfj0=" >> /etc/nix/nix.conf
echo "max-jobs = 4" >> /etc/nix/nix.conf
echo "==> Building sdImage (first run slow, cached after)..."
@@ -34,7 +37,7 @@ podman run --rm \
--print-build-logs
echo "==> Build complete, copying..."
cp result/sd-image/*.img* /repo/'${FILENAME}'
cp result/sd-image/*.img.zst /repo/'${FILENAME}'
echo "==> Done: ${FILENAME}"
ls -lh /repo/'${FILENAME}'
'