feat(menu): System ▸ Firmware — fwupd/LVFS update surface (#43)
All checks were successful
Check / eval (push) Successful in 3m3s
All checks were successful
Check / eval (push) Successful in 3m3s
Add a self-gated Firmware row to the System submenu (present whenever fwupdmgr is on PATH, i.e. services.fwupd.enable — default-on), its dispatch, and a `firmware` handler that opens a terminal and runs fwupdmgr refresh → get-updates → y/N confirm → fwupdmgr update. Never auto-flashes: fwupdmgr update confirms each device and prompts for the reboot a capsule needs (pillar 1 — no silent BIOS writes). HARDWARE.md §4 updated to "shipped". Verified V0 (nix flake check --no-build) + V1 (HM generation builds; generated nomarchy-menu passes bash -n; firmware handler emitted correctly). V2 (menu render in a session) queued in #43 and V3 (real LVFS flash) in HARDWARE-QUEUE — the VM was held by the #46 install test. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -651,6 +651,32 @@ ${themeRows}
|
||||
exec ${cfg.terminal} -e sh -c "nomarchy-doctor
|
||||
printf '\nEnter to close.'; read -r _" ;;
|
||||
|
||||
firmware)
|
||||
# System ▸ Firmware — fwupd/LVFS update surface (HARDWARE.md §4).
|
||||
# Never auto-flashes: refresh metadata, list what LVFS offers, then
|
||||
# hand to `fwupdmgr update`, which confirms each device and prompts
|
||||
# for the reboot a capsule needs (pillar 1 — no silent BIOS writes).
|
||||
# Self-gated on fwupdmgr in System; guard here too.
|
||||
command -v fwupdmgr >/dev/null 2>&1 \
|
||||
|| { notify-send "Firmware" "fwupd not available (services.fwupd.enable off?)."; exit 0; }
|
||||
exec ${cfg.terminal} -e sh -c '
|
||||
echo "== Refreshing firmware metadata (LVFS) =="
|
||||
fwupdmgr refresh || true
|
||||
echo
|
||||
echo "== Firmware updates available =="
|
||||
if fwupdmgr get-updates; then
|
||||
echo
|
||||
printf "Apply these updates? fwupd confirms each device. [y/N] "
|
||||
read -r ans
|
||||
case "$ans" in
|
||||
[yY]*) fwupdmgr update ;;
|
||||
*) echo "Cancelled — no firmware written." ;;
|
||||
esac
|
||||
else
|
||||
echo "Nothing to apply on this machine."
|
||||
fi
|
||||
printf "\nEnter to close."; read -r _' ;;
|
||||
|
||||
controlcenter)
|
||||
# Nomarchy TUI Control Center.
|
||||
exec ${cfg.terminal} -e nomarchy-control-center ;;
|
||||
@@ -748,6 +774,9 @@ ${themeRows}
|
||||
command -v nomarchy-snapshots >/dev/null 2>&1 && row "Snapshots" timeshift
|
||||
row "Rollback" edit-undo
|
||||
command -v nomarchy-doctor >/dev/null 2>&1 && row "Doctor" utilities-system-monitor
|
||||
# Firmware/LVFS updates — self-gated on fwupd (default-on, but off
|
||||
# on VMs/headless via services.fwupd.enable=false), like Printers.
|
||||
command -v fwupdmgr >/dev/null 2>&1 && row "Firmware" firmware-manager
|
||||
command -v nomarchy-control-center >/dev/null 2>&1 && row "Control Center" preferences-desktop
|
||||
if [ -e "''${bats[0]}" ] && command -v powerprofilesctl >/dev/null 2>&1; then
|
||||
row "Power profile" preferences-system-power
|
||||
@@ -772,6 +801,7 @@ ${themeRows}
|
||||
*Snapshots*) exec "$0" snapshot ;;
|
||||
*Rollback*) exec "$0" rollback ;;
|
||||
*Doctor*) exec "$0" doctor ;;
|
||||
*Firmware*) exec "$0" firmware ;;
|
||||
*"Control Center"*) exec "$0" controlcenter ;;
|
||||
*"Power profile"*) exec "$0" power-profile ;;
|
||||
*"Battery limit"*) exec "$0" batterylimit ;;
|
||||
|
||||
Reference in New Issue
Block a user