Make ./install something you could hand a stranger
The audit's third tier: everything between this installer and a fresh machine it has never met. The one path that could cost a person their display: the interview probes Secure Boot with mokutil, which install-packages had not installed yet, so on a minimal base the MOK question silently never fired -- and install-hardware still installed akmod-nvidia and blacklisted nouveau, arming a reboot into an unloadable driver with its fallback disabled. The probe tools (pciutils, mokutil, fwupd) now bootstrap beside gum, and install-hardware re-checks Secure Boot for itself and refuses the driver rather than the display. Secrets leave the checkout: the personal environment moves to ~/.config/panama/env at mode 600 by migration, and .bashrc sources it with a permission check that quietly re-tightens drift. change-settings no longer overwrites /etc/dnf/dnf.conf -- two performance keys are set additively, the defaultyes=True that made every `dnf remove` treat Enter as yes is gone, and a migration strips it from machines that already received it. Package installation survives the world changing: the initial and desktop lists run with --skip-unavailable and a report_missing pass that names what was skipped (resolved through --whatprovides, so capability names like awk do not cry wolf); the openh264, appstream and core-group extras go through soft; RustDesk resolves its RPM for the machine's own architecture; and the Claude Desktop repository script is fetched to a kept file and run, never piped from the network into root. The hardware predicates stop guessing: a wireless mouse's scope=Device battery no longer turns a tower into a laptop, USB-PD-only machines read their power state from the battery's own status instead of being permanently "on AC", the lid falls back to logind's LidClosed where ACPI is silent, and charge limits reach every pack of a two-battery machine in one authorization -- with the reported percentage summed across packs. And the parsers stop assuming this machine: snapper is read through --machine-readable csv with named columns instead of a localized box-drawing table, and reports whether snapshots are even possible so ext4 and unconfigured-btrfs stop looking identical; fprintd is parsed under LC_ALL=C; the hypridle drop-in resolves the binary it points at; the recorder's render node became an "auto" token resolved at record time; update-grub writes the config its firmware actually boots; the nvm prompt hook and the SSH tmux takeover are guarded; hipblas and rocm-opencl move to an opt-in gpu-compute category; and the two interactive python tools' libraries are declared. Claude-Session: https://claude.ai/code/session_01Epx9ZC1gwm81K3jm9x9CKh
This commit is contained in:
@@ -40,6 +40,18 @@ fi
|
||||
# ── NVIDIA ───────────────────────────────────────────────────────────────────
|
||||
|
||||
if [[ "${PANAMA_NVIDIA:-no}" == yes ]]; then
|
||||
# The interview asks about MOK enrollment only when mokutil was present to
|
||||
# see Secure Boot at all. Re-check here rather than trusting that the
|
||||
# question was ever asked: installing akmod-nvidia and blacklisting
|
||||
# nouveau under Secure Boot with no key to enroll produces a machine that
|
||||
# reboots into an unloadable driver with its fallback disabled -- the one
|
||||
# failure in this installer that costs a person their display.
|
||||
if mokutil --sb-state 2>/dev/null | grep -qi 'secureboot enabled' \
|
||||
&& [[ -z "${PANAMA_MOK_HASH:-}" ]]; then
|
||||
warn "Secure Boot is on and no MOK enrollment was prepared; refusing to install"
|
||||
warn "the NVIDIA driver, which could not load. Re-run ./install and answer the"
|
||||
warn "Secure Boot question, or disable Secure Boot first."
|
||||
else
|
||||
log "Installing the NVIDIA driver"
|
||||
if sudo dnf install -y akmod-nvidia xorg-x11-drv-nvidia-cuda; then
|
||||
# nouveau has to be out of the way before the kernel would otherwise
|
||||
@@ -61,6 +73,7 @@ if [[ "${PANAMA_NVIDIA:-no}" == yes ]]; then
|
||||
else
|
||||
warn "The NVIDIA driver did not install; skipping its kernel arguments and services"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# ── Secure Boot ──────────────────────────────────────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user