- Nix 67%
- Shell 33%
| .forgejo | ||
| hosts | ||
| modules | ||
| scripts | ||
| flake.lock | ||
| flake.nix | ||
| hardware-configuration.nix | ||
| README.md | ||
Open Source NixOS TV Station (Multi-Arch)
Projektziel
Aufbau einer "Appliance"-artigen Media Station auf Basis von NixOS. Das Ziel ist ein privatsphäre-freundliches, werbefreies und controller-gesteuertes TV-Erlebnis ohne Account-Zwang (kein Steam, kein Google Login im OS).
| System | Hostname | Architektur | Besonderheiten |
|---|---|---|---|
| PC / Mini-PC | tv-x86 |
x86_64 | UEFI Boot, Gamescope (HDR/VRR), High-End Emulation |
| Raspberry Pi 5 | tv-pi5 |
aarch64 | Experimentell, Waydroid Support |
| Raspberry Pi 4 | tv-pi4 |
aarch64 | SD-Card Boot, Basis-Performance |
🚀 Installation
1. Boot-Medium erstellen
Für PC (x86_64)
Lade das NixOS Minimal ISO (x86_64) und schreibe es auf einen USB-Stick:
# Ersetze /dev/sdX mit deinem USB-Stick!
sudo dd if=nixos-minimal-23.11-x86_64-linux.iso of=/dev/sdX bs=4M status=progress && sync
Für Raspberry Pi (AArch64)
Lade das NixOS SD Image (AArch64) und flashe es auf die SD-Karte.
2. Booten & Vorbereitung (Optional: SSH)
Boote das System. Sobald du eine Shell hast, verbinde dich mit dem Internet (Kabel oder wpa_supplicant).
Empfohlen: Setze ein Passwort für den nixos User, um die Installation bequem per SSH von deinem PC aus durchzuführen:
sudo passwd nixos
ip a # IP-Adresse anzeigen
Dann vom PC aus: ssh nixos@<IP-ADRESSE>
3. Installation starten (Der "One-Liner")
Führe folgenden Befehl auf dem Zielsystem aus. Er lädt Git, klont dieses Repo und startet den interaktiven Installer.
nix-shell -p git --run "bash <(curl -L https://git.portuus.de/steffen/nix-tv/raw/branch/main/scripts/install.sh)"
Der Installer führt dich durch:
- Systemwahl: Wähle PC, Pi 4 oder Pi 5.
- Festplatte: Wähle das Ziel-Laufwerk (z.B.
/dev/nvme0n1oder/dev/mmcblk0). - Bestätigung: Partitionierung und Installation laufen automatisch ab.
4. Nach dem ersten Start
Entferne das Installationsmedium und starte neu (reboot).
Logge dich als User tv ein (Passwort setzen: als root einloggen -> passwd tv).
Setup Skript (Waydroid & Apps)
Um Waydroid zu initialisieren und Apps (SmartTube, etc.) automatisch zu laden, führe dieses Skript aus:
bash <(curl -s https://git.portuus.de/steffen/nix-tv/raw/branch/main/scripts/setup-tv.sh)
🛠️ Features & Architektur
- OS: NixOS Unstable (Flakes)
- GUI: Gamescope Session (Steam Deck like)
- Frontend: Pegasus Frontend
- Android: Waydroid Container (LineageOS)
- AdBlock: AdGuard Home (DNS-Level)
- Updates: Automatisch via Comin (GitOps)
Enthaltene Apps
- SmartTubeNext (YouTube ohne Werbung)
- Nova Video Player (NAS Streaming)
- Moonlight (Game Streaming)
🔄 Updates & Wartung
Comin pollt regelmäßig den main Branch von https://git.portuus.de/steffen/nix-tv.git und wendet Änderungen automatisch an.
Um Änderungen auszurollen:
- Commit & Push in dieses Repo (
forgejo@git.portuus.de:steffen/nix-tv.git). - Warten oder
sudo systemctl restart cominam TV.
🧪 Entwicklung & CI
# Evaluation + Lint-Hooks (nixfmt, statix, shellcheck, yamllint, actionlint)
nix flake check
# Nur die Lint-Hooks
nix build --no-link .#checks.x86_64-linux.pre-commit-check
Forgejo Actions (Runner portuus-nix, .forgejo/workflows/):
ci.yml(Push aufmain, Pull Requests):nix flake check, Build vontv-x86undtv-pi4(aarch64 per binfmt-Emulation auf portuus);tv-pi5wird nur per--dry-rungeprüft, weil sein Kernel aus nixos-hardware emuliert Stunden zum Bauen bräuchte.security.yml(wöchentlich): CVE-Scan vontv-x86undtv-pi4mit vulnix und nvd-Diff zum letzten Scan; schlägt bei neuen CVEs mit CVSS >= 9.0 fehl.