- Add automatic SD image builds for Raspberry Pi via Forgejo Actions - Enable binfmt emulation on cryodev-main for aarch64 cross-builds - Add sd-image.nix module to cryodev-pi configuration - Create comprehensive docs/ structure with installation guides - Split installation docs into: first-install (server), reinstall, new-client (Pi) - Add lib/utils.nix and apps/rebuild from synix - Fix headplane module for new upstream API (tale/headplane) - Fix various module issues (mailserver stateVersion, option conflicts) - Add placeholder secrets.yaml files for both hosts - Remove old INSTRUCTIONS.md (content moved to docs/)
2.8 KiB
2.8 KiB
SD-Karten-Images für Raspberry Pi
Das Repository baut automatisch SD-Karten-Images für alle konfigurierten Raspberry Pi Hosts.
Automatischer Build
Bei Änderungen an main werden automatisch Images für alle Pi-Hosts gebaut und als Release veröffentlicht.
Download: Releases auf Forgejo
Verfügbare Images
| Host | Image-Name |
|---|---|
cryodev-pi |
cryodev-pi-sd-image.img.zst |
Neue Hosts werden automatisch gebaut, wenn sie zur Workflow-Matrix hinzugefügt werden.
Image flashen
1. Herunterladen
wget https://git.cryodev.xyz/.../releases/latest/download/<hostname>-sd-image.img.zst
wget https://git.cryodev.xyz/.../releases/latest/download/<hostname>-sd-image.img.zst.sha256
# Checksum prüfen
sha256sum -c <hostname>-sd-image.img.zst.sha256
2. Dekomprimieren
zstd -d <hostname>-sd-image.img.zst -o <hostname>.img
3. Auf SD-Karte schreiben
# Richtiges Gerät finden
lsblk
# Schreiben (ACHTUNG: richtiges Gerät wählen!)
sudo dd if=<hostname>.img of=/dev/sdX bs=4M conv=fsync status=progress
Alternativ: balenaEtcher oder Raspberry Pi Imager verwenden.
Was ist im Image?
- Vollständige NixOS-Installation für den spezifischen Host
- Alle konfigurierten Services (außer Secrets)
- SSH-Server aktiviert
- Automatische Root-Partition-Erweiterung beim ersten Boot
- Comin für automatische Updates
Was fehlt?
SOPS-Secrets können nicht im Image enthalten sein (Henne-Ei-Problem mit SSH-Host-Key).
Nach dem ersten Boot:
- Age-Key vom Pi holen
.sops.yamlaktualisierensecrets.yamlerstellen- Konfiguration deployen
Siehe Neuen Client hinzufügen für die vollständige Anleitung.
Neuen Host zur Pipeline hinzufügen
- Host-Konfiguration in
hosts/<hostname>/erstellen - In
.forgejo/workflows/build-pi-image.ymlzur Matrix hinzufügen:
matrix:
host: [cryodev-pi, neuer-host] # <- hier hinzufügen
- Push auf
main→ Image wird automatisch gebaut
Manuell bauen
# Auf aarch64 (z.B. anderem Pi)
nix build .#nixosConfigurations.<hostname>.config.system.build.sdImage
# Auf x86_64 mit QEMU-Emulation (langsam)
nix build .#nixosConfigurations.<hostname>.config.system.build.sdImage \
--extra-platforms aarch64-linux
Voraussetzung auf x86_64:
{
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
}
Troubleshooting
Workflow schlägt fehl
- Prüfe ob
sd-image.nixin der Host-Konfiguration importiert wird - Prüfe ob binfmt auf cryodev-main aktiviert ist
Image bootet nicht
- SD-Karte korrekt beschrieben?
- Andere SD-Karte versuchen
- Stromversorgung prüfen (min. 3A für Pi 4)
Kein Netzwerk
- Ethernet-Kabel prüfen
- DHCP-Server im Netzwerk?