feat(box): the box's NixOS system as a module, and lib.mkBox from a few names
check / check (push) Canceled after 0s

The box within reach of the couch: a Raspberry Pi 3B with the AIY Voice
HAT, from the first household's configuration, made generic.

- box/body: the button service, in Python: press and talk, turns by
  voice, a press interrupts; the look signal
- box/*.js: the ir and look capabilities, behind gates, for the brain;
  the ask client, the box's side of a conversation
- box/module.nix: the services, each confined to the devices and
  addresses it needs; the private network as an option (a tailnet by
  default); the Pico found by its USB IDs, as /dev/pdtv26-ir
- box/voicehat.nix: the Voice HAT's device tree overlay and ALSA setup
- lib.mkBox: a box's whole system from its name, the home server's,
  the Wi-Fi network's, and who looks after it
- checks: box-js, box-py (doctests and pyflakes), and box-system (an
  example box's system evaluates)

Generated-by: Claude Opus 5.5
This commit is contained in:
dckc committed 2026-12-02 16:18:17 -06:00
1 parent 2e7156dc36
commit 521998b666
35 files changed
+2165 -3

No files matched your search

+18
View File
@@ -0,0 +1,18 @@
#!/bin/sh
# Put a Wi-Fi network's PSK on the card's root, for networking.wireless.secretsFile.
# The passphrase comes from the desktop keyring and goes no further than wifi_psk.py;
# only the PSK goes on the card. To keep it there, once:
# secret-tool store --label="Wi-Fi SSID" service wifi ssid SSID
set -eu
ssid=${1:?usage: wifi-secret.sh SSID MOUNTPOINT}
mnt=${2:?usage: wifi-secret.sh SSID MOUNTPOINT}
here=$(dirname "$0")
sudo mkdir -p "$mnt"
mountpoint -q "$mnt" || sudo mount /dev/disk/by-label/NIXOS_SD "$mnt"
trap 'sudo umount "$mnt"' EXIT
secret-tool lookup service wifi ssid "$ssid" \
| python3 -I "$here/wifi_psk.py" "$ssid" psk \
| sudo install -D -m 640 /dev/stdin "$mnt/etc/wifi-secrets"
sudo grep -c '^psk=[0-9a-f]\{64\}$' "$mnt/etc/wifi-secrets"