From 408a0e4862f2ef2d1b244fbff614ca9659bc7842 Mon Sep 17 00:00:00 2001 From: s8n Date: Sat, 2 May 2026 04:38:18 +0100 Subject: [PATCH] feat(installer): pre-stage gum-based UX assets for v0.5.1 (#7) Drops in branded assets the v0.5.1 installer rewrite (whiptail -> gum) will consume: ASCII banner, sourceable GUM_* env-var palette matching the veilor-black KDE color scheme, and an INSTALLER.md walkthrough. The existing v0.5.0 veilor-installer script is intentionally untouched so the swap can land in a separate, focused PR. Co-authored-by: s8n-ru <279801990+s8n-ru@users.noreply.github.com> Co-authored-by: Claude Opus 4.7 --- assets/installer/banner.txt | 7 +++ assets/installer/colors.gum | 83 ++++++++++++++++++++++++++++++++ docs/INSTALLER.md | 95 +++++++++++++++++++++++++++++++++++++ 3 files changed, 185 insertions(+) create mode 100644 assets/installer/banner.txt create mode 100644 assets/installer/colors.gum create mode 100644 docs/INSTALLER.md diff --git a/assets/installer/banner.txt b/assets/installer/banner.txt new file mode 100644 index 0000000..a7f2623 --- /dev/null +++ b/assets/installer/banner.txt @@ -0,0 +1,7 @@ + _ __ + _ _____ (_) /___ _____ ____ _____ +| | / / _ \/ / / __ \/ ___/_____/ __ \/ ___/ +| |/ / __/ / / /_/ / / /_____/ /_/ (__ ) +|___/\___/_/_/\____/_/ \____/____/ + + hardened. branded. yours. diff --git a/assets/installer/colors.gum b/assets/installer/colors.gum new file mode 100644 index 0000000..58b3630 --- /dev/null +++ b/assets/installer/colors.gum @@ -0,0 +1,83 @@ +# veilor-os installer — gum styling presets +# +# Source this file from the installer to apply branded colors to all +# `gum` (charm.sh/gum) widgets. Pure black bg, white fg, grey accents. +# Palette taken from the veilor-black KDE color scheme. +# +# Usage: +# source /usr/share/veilor/installer/colors.gum +# gum choose "Install" "Live" "Reboot" +# gum input --placeholder "hostname" +# gum confirm "Proceed?" +# +# Reference: https://github.com/charmbracelet/gum#styling +# Pattern: GUM__ +# Colors are 24-bit hex; gum uses lipgloss internally. + +# ── Palette ──────────────────────────────────────────── +# Base colors from assets/kde/veilor-black.colors +export VEILOR_BG="#000000" # pure black background +export VEILOR_FG="#FFFFFF" # white foreground +export VEILOR_DIM="#686B6F" # grey accent (104,107,111 → #686B6F) +export VEILOR_MUTE="#3D3D3D" # disabled / muted + +# ── gum choose ───────────────────────────────────────── +# Single- or multi-select menu (used for the main menu, locale, disk). +export GUM_CHOOSE_CURSOR_FOREGROUND="$VEILOR_DIM" +export GUM_CHOOSE_HEADER_FOREGROUND="$VEILOR_FG" +export GUM_CHOOSE_ITEM_FOREGROUND="$VEILOR_FG" +export GUM_CHOOSE_SELECTED_FOREGROUND="$VEILOR_FG" +export GUM_CHOOSE_SELECTED_BACKGROUND="$VEILOR_DIM" +export GUM_CHOOSE_CURSOR="› " + +# ── gum input ────────────────────────────────────────── +# Single-line text entry (hostname). +export GUM_INPUT_PROMPT_FOREGROUND="$VEILOR_DIM" +export GUM_INPUT_CURSOR_FOREGROUND="$VEILOR_FG" +export GUM_INPUT_PLACEHOLDER_FOREGROUND="$VEILOR_MUTE" +export GUM_INPUT_HEADER_FOREGROUND="$VEILOR_FG" +export GUM_INPUT_PROMPT="› " + +# ── gum write (multi-line) ───────────────────────────── +# Reserved for any longer-form prompts; not used in v0.5.1 yet. +export GUM_WRITE_PROMPT_FOREGROUND="$VEILOR_DIM" +export GUM_WRITE_CURSOR_FOREGROUND="$VEILOR_FG" +export GUM_WRITE_HEADER_FOREGROUND="$VEILOR_FG" + +# ── gum confirm ──────────────────────────────────────── +# Yes/no prompt (final install confirmation). +export GUM_CONFIRM_PROMPT_FOREGROUND="$VEILOR_FG" +export GUM_CONFIRM_SELECTED_FOREGROUND="$VEILOR_FG" +export GUM_CONFIRM_SELECTED_BACKGROUND="$VEILOR_DIM" +export GUM_CONFIRM_UNSELECTED_FOREGROUND="$VEILOR_DIM" + +# ── gum spin ─────────────────────────────────────────── +# Spinner shown while anaconda runs. +export GUM_SPIN_SPINNER_FOREGROUND="$VEILOR_FG" +export GUM_SPIN_TITLE_FOREGROUND="$VEILOR_DIM" +export GUM_SPIN_SPINNER="dot" + +# ── gum filter ───────────────────────────────────────── +# Searchable list (potential disk picker for systems with many disks). +export GUM_FILTER_PROMPT_FOREGROUND="$VEILOR_DIM" +export GUM_FILTER_INDICATOR_FOREGROUND="$VEILOR_FG" +export GUM_FILTER_SELECTED_INDICATOR_FOREGROUND="$VEILOR_FG" +export GUM_FILTER_MATCH_FOREGROUND="$VEILOR_FG" +export GUM_FILTER_HEADER_FOREGROUND="$VEILOR_FG" + +# ── gum style (free-form boxes) ──────────────────────── +# Used to draw the banner card and section dividers. +export GUM_STYLE_FOREGROUND="$VEILOR_FG" +export GUM_STYLE_BACKGROUND="$VEILOR_BG" +export GUM_STYLE_BORDER="rounded" +export GUM_STYLE_BORDER_FOREGROUND="$VEILOR_DIM" +export GUM_STYLE_PADDING="1 2" +export GUM_STYLE_MARGIN="0" + +# ── gum table ────────────────────────────────────────── +# Used for the install summary (disk / hostname / locale). +export GUM_TABLE_BORDER_FOREGROUND="$VEILOR_DIM" +export GUM_TABLE_HEADER_FOREGROUND="$VEILOR_FG" +export GUM_TABLE_CELL_FOREGROUND="$VEILOR_FG" +export GUM_TABLE_SELECTED_FOREGROUND="$VEILOR_FG" +export GUM_TABLE_SELECTED_BACKGROUND="$VEILOR_DIM" diff --git a/docs/INSTALLER.md b/docs/INSTALLER.md new file mode 100644 index 0000000..c23d198 --- /dev/null +++ b/docs/INSTALLER.md @@ -0,0 +1,95 @@ +# veilor-os Installer + +Branded TUI installer that runs on `tty1` of the live ISO. Wraps the +underlying `anaconda` kickstart install with a single-flow user experience +similar in spirit to `omarchy` and `archinstall`. + +> **Status (v0.5.1):** TUI rewritten on top of [`gum`][gum] (charm.sh's +> Go TUI toolkit). Replaces the v0.5.0 `whiptail` build, which used the +> Fedora-default colors and looked out of place against the rest of the +> branded system. + +## Screenshots + +> _Placeholder — real screenshots to be captured against the v0.5.1 ISO +> once the gum-based installer ships and boots clean on test hardware._ + +| Stage | Path | +|----------------|---------------------------------------| +| Banner + menu | `assets/installer/screenshots/01-menu.png` _(TBD)_ | +| Disk picker | `assets/installer/screenshots/02-disk.png` _(TBD)_ | +| Confirm | `assets/installer/screenshots/03-confirm.png` _(TBD)_ | +| Install spin | `assets/installer/screenshots/04-spin.png` _(TBD)_ | + +## Boot flow + +``` +power on + └─ UEFI / GRUB + └─ live kernel + initramfs + └─ systemd → multi-user.target + └─ getty@tty1.service.d/veilor-installer.conf + └─ /usr/local/sbin/veilor-installer + ├─ source assets/installer/colors.gum + ├─ cat assets/installer/banner.txt + └─ gum choose
+``` + +The override at `overlay/etc/systemd/system/getty@tty1.service.d/veilor-installer.conf` +replaces the standard login prompt on tty1 with the installer entry point. +Other ttys (2-6) still get a normal getty for recovery use. + +## Main menu + +| # | Option | Action | +|----|---------------------------------------------|--------------------------------------------| +| 1 | Install veilor-os to disk | collect answers → generate ks → anaconda | +| 2 | Try live — desktop (KDE Plasma) | `systemctl isolate graphical.target` | +| 3 | Try live — shell | `exec /bin/bash --login` | +| 4 | Reboot | `systemctl reboot` | +| 5 | Power off | `systemctl poweroff` | + +## Install path — questions asked + +In order, the installer collects: + +1. **Target disk** (`gum choose` over `lsblk` output — selected disk is wiped) +2. **Hostname** (`gum input`, default `veilor`) +3. **LUKS passphrase** (`gum input --password`, min 8 chars, full-disk encryption) +4. **Admin password** (`gum input --password`, min 8 chars) +5. **Locale** (`gum choose` — en_GB, en_US, de_DE, fr_FR) +6. **Confirmation** (`gum confirm` — summary of choices before destructive step) + +Answers are written into `/run/install/veilor-generated.ks` and handed off +to `anaconda --kickstart=...`. The kickstart inlines the LUKS passphrase +and the admin password — the file is _never_ committed and lives only in +the live tmpfs. + +## Branding assets + +| File | Purpose | +|-------------------------------------|----------------------------------------| +| `assets/installer/banner.txt` | ASCII banner shown above the menu | +| `assets/installer/colors.gum` | sourceable bash file of GUM_* env vars | + +The palette mirrors `assets/kde/veilor-black.colors`: +black `#000000` background, white `#FFFFFF` foreground, grey `#686B6F` +accent. No reds, no other colors. Pure monochrome. + +## Logs + +- `/var/log/veilor-installer.log` — installer stdout/stderr +- `/tmp/anaconda.log` — kickstart execution log + +Both are tee'd to the screen during the install spin, so a failed install +leaves visible breadcrumbs without forcing the user to dig. + +## Credits & license + +- [`gum`][gum] by [Charm](https://charm.sh) — MIT-licensed Go TUI toolkit. + We dynamically `exec` gum at runtime; no source vendored. Distributed via + the Fedora `gum` package. +- veilor-installer itself is MIT-licensed (see [LICENSE](../LICENSE)), + matching the rest of the repo and the upstream gum project. + +[gum]: https://github.com/charmbracelet/gum