SmartestHome/hosts/audio-endpoint/rpi-image-gen/config/audio-endpoint.yaml

63 lines
2.7 KiB
YAML

# rpi-image-gen build config for the headless audio-endpoint image (arm64).
#
# UNVERIFIED AGAINST THE REAL TOOL — see hosts/audio-endpoint/README.md's
# prominent callout. rpi-image-gen's exact layer/config YAML schema was not
# hands-on validated while writing this (no ARM build environment or the tool
# itself available). This is a best-effort, structurally sound attempt based on
# rpi-image-gen's documented config/layer/device/image directory structure and
# `rpi-image-gen build -c <config>.yaml` invocation. If a real build rejects
# this file:
# rpi-image-gen layer --list
# rpi-image-gen layer --describe <name>
# on the actual build host is the authoritative source — adjust the *keys*
# below to match what that reports. The intent behind each section (device
# target, packages, files to inject, which service to enable, and the
# build-time hook) should carry over even if the exact key names don't.
image:
name: audio-endpoint
arch: arm64
device:
# Any 40-pin-header Raspberry Pi works — Zero 2 W is the cheapest that's
# enough for a single Spotify Connect stream. Change if targeting a
# different specific model.
board: raspberrypi-zero2w
os: bookworm
# Base packages the image needs regardless of which Spotify Connect backend
# ends up installed (see scripts/install-spotify-connect.sh, run via the
# hook below) — alsa-utils for the userspace ALSA tools, no PipeWire/desktop
# stack at all (see hosts/audio-endpoint/README.md's "Audio output" section).
packages:
- alsa-utils
# Files copied into the target rootfs. Paths are relative to this config file.
files:
- src: ../../configs/spotify-connect.service
dst: /etc/systemd/system/spotify-connect.service
- src: ../../configs/spotify-connect-start
dst: /usr/local/bin/spotify-connect-start
mode: "0755"
- src: ../systemd/spotify-connect.service.d/10-alsa-device.conf
dst: /etc/systemd/system/spotify-connect.service.d/10-alsa-device.conf
- src: ../config.txt.d/hifiberry-amp2.txt
dst: /boot/firmware/config.txt
append: true
# Runs chrooted into the target rootfs at build time — the apt-first/
# documented-fallback Spotify Connect install (see that script's own header)
# plus enabling the resulting unit. This is the single most likely key name
# to need adjusting against the real tool's hook mechanism.
hooks:
chroot:
- ../scripts/install-spotify-connect.sh
# Left at the tool's own default — Raspberry Pi Imager's OS Customisation
# dialog overrides this per physical unit after the image is built (see
# hosts/audio-endpoint/README.md's "Per-room identity" section). Do not
# hardcode a room name here; spotify-connect-start reads $(hostname) at
# service-start time, whatever it ends up being set to per unit.
hostname:
set: audio-endpoint