feat(box): the box's NixOS system as a module, and lib.mkBox from a few names
check / check (push) Canceled after 0s
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:
1 parent
2e7156dc36
commit
521998b666
35 files changed
+2165
-3
No files matched your search
Executable
+14
@@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
# Show the device, and refuse unless it looks like an SD card in a USB reader:
|
||||
# removable, on USB, under 128 GB.
|
||||
set -eu
|
||||
dev=${1:?usage: card-check.sh /dev/sdX}
|
||||
|
||||
lsblk -o NAME,SIZE,TYPE,TRAN,RM,MODEL,MOUNTPOINTS,FSTYPE,LABEL "$dev"
|
||||
rm=$(lsblk -dno RM "$dev" | tr -d ' ')
|
||||
tran=$(lsblk -dno TRAN "$dev" | tr -d ' ')
|
||||
size=$(lsblk -bdno SIZE "$dev" | tr -d ' ')
|
||||
|
||||
[ "$rm" = 1 ] || { echo "$dev isn't removable" >&2; exit 1; }
|
||||
[ "$tran" = usb ] || { echo "$dev isn't on USB" >&2; exit 1; }
|
||||
[ "$size" -lt 137438953472 ] || { echo "$dev is too big for an SD card" >&2; exit 1; }
|
||||
Reference in new issue
Block a user