fix(qa): comprehensive out-of-the-box audit and repair

- Fix critical bash dynamic scoping bug in install.sh (Impermanence/Form Factor).
- Polished Live ISO with auto-login and passwordless sudo.
- Repurposed nomarchy-toggle-suspend to directly execute systemctl suspend.
- Updated nomarchy-launch-wifi to use nmtui in alacritty.
- Optimized nomarchy-welcome to avoid redundant rebuilds via --no-update flag.
- Enabled nomarchy-welcome in Hyprland autostart.
- Wrapped Live ISO-modifying steps in welcome wizard to prevent failures.
- Removed obsolete hardware auto-detection from nomarchy-on-boot.
- Hardened script doc generator against false-positive wildcard tokens.
- Regenerated docs/SCRIPTS.md and updated docs/ROADMAP.md.
This commit is contained in:
Bernardo Magri
2026-05-01 20:03:04 +01:00
parent 39b1a9c1b3
commit 6411395d9f
13 changed files with 73 additions and 129 deletions

View File

@@ -19,7 +19,7 @@ Guardrails (apply when adding anything):
### Now (ready to pick up)
- (empty — pick the top of **Next**.)
- **Thorough Out-of-the-Box QA Audit.** A complete and thorough review of the distro to identify and fix anything broken or not working as intended in a fresh installation (including the `nomarchy-live` ISO) without any manual configuration. Focus areas: theme engine and switching, script execution, menu mappings, and overall default desktop polish.
### Next (bigger lifts that build on Now)
@@ -136,6 +136,7 @@ Nomarchy is moving away from being a "flavor" of Omarchy to its own distinct ide
(Move items here when they land — keep them brief, link the commit/PR.)
- _2026-05-01_ — Installer & Script Audit Polish. (1) Fixed a critical bash dynamic scoping bug in `installer/install.sh` where `rc=0` assignments inside functions (Impermanence, Form Factor) were clobbering the main loop's return code, causing the installer to abort when "No" was selected; (2) Polished `hosts/nomarchy-live.nix` with auto-login for the `nixos` user and passwordless sudo for the `wheel` group; (3) Repurposed `nomarchy-toggle-suspend` to execute `systemctl suspend` directly and updated `nomarchy-menu` to reflect this; (4) Updated `nomarchy-launch-wifi` to use `nmtui` in Alacritty; (5) Regenerated `docs/SCRIPTS.md` to reflect the updated script mappings.
- _2026-04-30_ — `set -e` sweep across `nomarchy-*` scripts. Added `set -e` to 142 of 169 bash scripts that lacked it (27 already had it). Halts a class of "command failed silently in the middle of a chain, system left in half-applied state" bugs that produced repeat-fix commits. One deliberate exception: `nomarchy-menu` runs without `set -e` because it's an interactive UX loop where action failures should re-display the menu rather than abort the script. Pre-commit hook now enforces `bash -n` + `shellcheck --severity=error` so future scripts can't regress this.
- _2026-04-30_ — Installer disk-phase reliability. Hardened `installer/install.sh` and consolidated the disko configs: (1) `select_disk` now hides the live-ISO boot device(s) so the installer can't format its own boot media (`NOMARCHY_INSTALL_ALLOW_ISO_TARGET=1` to override); (2) added a 10 GiB minimum-capacity preflight; (3) `prewipe_target_drive` enumerates every active dm-crypt mapping backed by the target drive and closes them, drops the silent `|| true` from `wipefs`/`sgdisk`/`dd`, bounds `udevadm settle` to 30s, and refuses to continue if anything is still mounted; (4) wrapped the disko call in `run_disko_with_retry` with last-30-lines + Retry / View full log / Abort dialog on failure; (5) replaced the sed-templated `disko-golden.nix` + `disko-btrfs-multi.nix` pair with a single `disko-config.nix` Nix function called via `--argstr mainDrive … --arg extraDrives '[…]'` — eliminates a class of escaping bugs (cf. `3aadc36`); (6) added an EXIT trap so the tmpfs LUKS key file is removed even on early abort.
- _2026-04-30_ — Gaming home-side companion. New `nomarchy.gaming.enable` option (mirror of `nomarchy.system.gaming.enable`) and `core/home/gaming.nix` module that injects a Hyprland `windowrulev2 = fullscreen, class:^(steam_app_).*$` so Steam-launched games grab the whole screen. Closes the "Gaming — Hyprland window rule" Next-column row.

View File

@@ -54,8 +54,8 @@ Phase B (per-batch PRs) refines those into `port-from-omarchy`,
| `nomarchy-drive-info` | `features/scripts/utils` | features/scripts/utils/nomarchy-drive-select | `kept` | |
| `nomarchy-drive-select` | `features/scripts/utils` | features/scripts/utils/nomarchy-drive-info,features/scripts/utils/nomarchy-drive-set-password | `kept` | |
| `nomarchy-drive-set-password` | `features/scripts/utils` | features/scripts/utils/nomarchy-drive-select,features/scripts/utils/nomarchy-menu | `kept` | |
| `nomarchy-env-update` | `features/scripts/utils` | core/home/bash.nix,core/system/scripts/nomarchy-pkg-add, +8 more | `kept` | |
| `nomarchy-font` | `features/scripts/utils` | core/home/config/nomarchy-skill/SKILL.md,core/system/fonts.nix, +6 more | `kept` | |
| `nomarchy-env-update` | `features/scripts/utils` | core/home/bash.nix,core/system/scripts/nomarchy-pkg-add, +7 more | `kept` | |
| `nomarchy-font` | `features/scripts/utils` | bin/utils/nomarchy-docs-scripts,core/home/config/nomarchy-skill/SKILL.md, +7 more | `kept` | |
| `nomarchy-font-current` | `themes/engine/scripts` | core/home/config/nomarchy-skill/SKILL.md,features/scripts/utils/nomarchy-menu | `kept` | |
| `nomarchy-font-list` | `themes/engine/scripts` | core/home/config/nomarchy-skill/SKILL.md,features/scripts/utils/nomarchy-font, +2 more | `kept` | |
| `nomarchy-font-set` | `themes/engine/scripts` | core/home/config/nomarchy-skill/SKILL.md,features/scripts/utils/nomarchy-font, +4 more | `kept` | |
@@ -82,8 +82,8 @@ Phase B (per-batch PRs) refines those into `port-from-omarchy`,
| `nomarchy-launch-browser` | `features/scripts/utils` | core/home/config/nomarchy/default/hypr/plain-bindings.conf,core/home/config/nomarchy-skill/SKILL.md, +1 more | `kept` | |
| `nomarchy-launch-editor` | `features/scripts/utils` | core/home/config/nomarchy/default/hypr/plain-bindings.conf,features/desktop/hyprland/config/bindings.conf, +2 more | `kept` | |
| `nomarchy-launch-floating-terminal-with-presentation` | `features/scripts/utils` | core/home/config/nomarchy/default/mako/core.ini,features/desktop/waybar/config/config.jsonc, +3 more | `kept` | |
| `nomarchy-launch-or-focus` | `features/scripts/utils` | core/home/config/nomarchy/extensions/menu.sh,features/desktop/hyprland/config/bindings.conf, +7 more | `kept` | |
| `nomarchy-launch-or-focus-tui` | `features/scripts/utils` | core/home/config/nomarchy/extensions/menu.sh,features/desktop/waybar/config/config.jsonc, +4 more | `kept` | |
| `nomarchy-launch-or-focus` | `features/scripts/utils` | core/home/config/nomarchy/extensions/menu.sh,features/desktop/hyprland/config/bindings.conf, +6 more | `kept` | |
| `nomarchy-launch-or-focus-tui` | `features/scripts/utils` | core/home/config/nomarchy/extensions/menu.sh,features/desktop/waybar/config/config.jsonc, +3 more | `kept` | |
| `nomarchy-launch-or-focus-webapp` | `features/scripts/utils` | features/desktop/hyprland/config/bindings.conf | `kept` | |
| `nomarchy-launch-screensaver` | `features/scripts/utils` | features/desktop/idle.nix,features/scripts/utils/nomarchy-menu | `kept` | |
| `nomarchy-launch-tui` | `features/scripts/utils` | core/home/config/nomarchy/default/hypr/bindings/utilities.conf,features/desktop/hyprland/config/bindings.conf, +2 more | `kept` | |
@@ -150,7 +150,7 @@ Phase B (per-batch PRs) refines those into `port-from-omarchy`,
| `nomarchy-test-installer` | `features/scripts/utils` | features/scripts/utils/nomarchy-test-vm,README.md | `kept` | |
| `nomarchy-test-live-iso` | `features/scripts/utils` | hosts/nomarchy-live.nix | `kept` | |
| `nomarchy-test-vm` | `features/scripts/utils` | features/scripts/utils/nomarchy-test-live-iso | `kept` | |
| `nomarchy-theme` | `features/scripts/utils` | core/home/config/nomarchy/default/elephant/nomarchy_background_selector.lua,core/home/config/nomarchy/default/elephant/nomarchy_themes.lua, +16 more | `kept` | |
| `nomarchy-theme` | `features/scripts/utils` | bin/utils/nomarchy-docs-scripts,core/home/config/nomarchy/default/elephant/nomarchy_background_selector.lua, +17 more | `kept` | |
| `nomarchy-theme-bg-install` | `themes/engine/scripts` | — | `unused?` | |
| `nomarchy-theme-bg-next` | `themes/engine/scripts` | core/home/config/nomarchy-skill/SKILL.md,features/scripts/utils/nomarchy-wallpaper, +1 more | `kept` | |
| `nomarchy-theme-bg-set` | `themes/engine/scripts` | core/home/config/nomarchy/default/elephant/nomarchy_background_selector.lua | `kept` | |
@@ -189,13 +189,13 @@ Phase B (per-batch PRs) refines those into `port-from-omarchy`,
| `nomarchy-voxtype-model` | `features/scripts/utils` | features/desktop/waybar/config/config.jsonc,features/desktop/waybar/themes/summer-night/config.jsonc | `kept` | |
| `nomarchy-voxtype-remove` | `features/scripts/utils` | — | `unused?` | |
| `nomarchy-voxtype-status` | `features/scripts/utils` | features/desktop/waybar/config/config.jsonc,features/desktop/waybar/themes/summer-night/config.jsonc | `kept` | |
| `nomarchy-wallpaper` | `features/scripts/utils` | core/home/config/nomarchy/default/hypr/autostart.conf,features/desktop/hyprland/default.nix, +2 more | `kept` | |
| `nomarchy-wallpaper` | `features/scripts/utils` | bin/utils/nomarchy-docs-scripts,core/home/config/nomarchy/default/hypr/autostart.conf, +3 more | `kept` | |
| `nomarchy-webapp-handler-hey` | `features/scripts/utils` | — | `unused?` | |
| `nomarchy-webapp-handler-zoom` | `features/scripts/utils` | — | `unused?` | |
| `nomarchy-webapp-install` | `features/scripts/utils` | features/scripts/utils/nomarchy-webapp-remove-all | `kept` | |
| `nomarchy-webapp-remove` | `features/scripts/utils` | — | `unused?` | |
| `nomarchy-webapp-remove-all` | `features/scripts/utils` | — | `unused?` | |
| `nomarchy-welcome` | `features/scripts/utils` | — | `unused?` | |
| `nomarchy-welcome` | `features/scripts/utils` | core/home/config/nomarchy/default/hypr/autostart.conf | `kept` | |
| `nomarchy-wifi-powersave` | `core/system/scripts` | — | `unused?` | |
| `nomarchy-windows-vm` | `features/scripts/utils` | — | `unused?` | |
@@ -205,35 +205,20 @@ Tokens grepped from `core/`, `features/`, `themes/`, `installer/`, `hosts/`, `bi
| Token | Referenced in | Status |
| --- | --- | --- |
| `nomarchy-brightness` | core/home/config/nomarchy/default/hypr/bindings/media.conf,core/home/config/nomarchy/default/hypr/bindings/utilities.conf, +3 more | `missing` |
| `nomarchy-cmd` | core/home/config/nomarchy/default/hypr/bindings/media.conf,core/home/config/nomarchy/default/hypr/bindings/utilities.conf, +14 more | `missing` |
| `nomarchy-dev` | core/home/config/nomarchy-skill/SKILL.md | `missing` |
| `nomarchy-dryrun` | installer/install.sh | `missing` |
| `nomarchy-font-selector` | features/scripts/utils/nomarchy-font,themes/engine/switcher.nix | `missing` |
| `nomarchy-installer` | features/scripts/utils/nomarchy-build-iso,README.md | `missing` |
| `nomarchy-launch` | core/home/config/nomarchy/default/hypr/bindings/clipboard.conf,core/home/config/nomarchy/default/hypr/bindings/utilities.conf, +24 more | `missing` |
| `nomarchy-live` | features/scripts/utils/nomarchy-build-live-iso,features/scripts/utils/nomarchy-on-boot, +1 more | `missing` |
| `nomarchy-live` | features/scripts/utils/nomarchy-build-live-iso,features/scripts/utils/nomarchy-test-live-iso | `missing` |
| `nomarchy-luks` | installer/disko-config.nix,installer/install.sh | `missing` |
| `nomarchy-menu-rows` | bin/utils/nomarchy-docs-scripts,features/scripts/utils/nomarchy-docs-scripts | `missing` |
| `nomarchy-nopasswd` | core/system/scripts/nomarchy-sudo-passwordless-toggle | `missing` |
| `nomarchy-nopasswd-expire` | core/system/scripts/nomarchy-sudo-passwordless-toggle | `missing` |
| `nomarchy-pkg` | bin/utils/nomarchy-docs-scripts,core/home/config/nomarchy-skill/SKILL.md, +8 more | `missing` |
| `nomarchy-plymouth` | themes/engine/plymouth.nix | `missing` |
| `nomarchy-refresh` | core/home/config/nomarchy-skill/SKILL.md,features/scripts/utils/nomarchy-refresh-config, +1 more | `missing` |
| `nomarchy-restart` | core/home/config/nomarchy-skill/SKILL.md,core/system/scripts/nomarchy-restart-xcompose, +10 more | `missing` |
| `nomarchy-screenrecord-filename` | features/scripts/utils/nomarchy-cmd-screenrecord | `missing` |
| `nomarchy-scripts` | core/system/scripts/nomarchy-preflight-migration,features/scripts/battery-monitor.nix, +1 more | `missing` |
| `nomarchy-sddm-theme` | themes/engine/sddm.nix | `missing` |
| `nomarchy-setup` | core/home/config/nomarchy-skill/SKILL.md,features/scripts/utils/nomarchy-menu | `missing` |
| `nomarchy-system-scripts` | core/system/hardware.nix,core/system/scripts-derivation.nix, +1 more | `missing` |
| `nomarchy-theme-engine-scripts` | themes/engine/scripts.nix | `missing` |
| `nomarchy-theme-next` | core/home/config/nomarchy-skill/SKILL.md | `missing` |
| `nomarchy-theme-selector` | features/scripts/utils/nomarchy-theme,themes/engine/switcher.nix | `missing` |
| `nomarchy-themes-no-images` | themes/engine/files.nix | `missing` |
| `nomarchy-toggle` | core/home/config/nomarchy/default/hypr/bindings/utilities.conf,core/home/config/nomarchy-skill/SKILL.md, +3 more | `missing` |
| `nomarchy-vm` | features/scripts/utils/nomarchy-test-vm | `missing` |
| `nomarchy-wallpaper-selector` | features/scripts/utils/nomarchy-wallpaper,themes/engine/switcher.nix | `missing` |
| `nomarchy-webapp-handler` | features/scripts/utils/nomarchy-webapp-remove,features/scripts/utils/nomarchy-webapp-remove-all | `missing` |
| `nomarchy-windows` | features/scripts/utils/nomarchy-windows-vm | `missing` |
## Menu items
@@ -295,7 +280,6 @@ Walked from `features/scripts/utils/nomarchy-menu`. Each `case` arm in a `show_*
| `show_setup_config_menu` | Waybar | `nomarchy-restart-waybar` | `kept` |
| `show_setup_config_menu` | XCompose | `nomarchy-restart-xcompose` | `kept` |
| `show_setup_config_menu` | Overrides | `_(inline)_` | `kept` |
| `show_setup_system_menu` | Suspend | `nomarchy-toggle-suspend` | `kept` |
| `show_update_menu` | Nomarchy | `nomarchy-update` | `kept` |
| `show_update_menu` | Themes | `nomarchy-theme-update` | `kept` |
| `show_update_menu` | Process | `_(inline)_` | `kept` |
@@ -316,7 +300,7 @@ Walked from `features/scripts/utils/nomarchy-menu`. Each `case` arm in a `show_*
| `show_update_password_menu` | User | `_(inline)_` | `kept` |
| `show_system_menu` | Screensaver | `nomarchy-launch-screensaver` | `kept` |
| `show_system_menu` | Lock | `nomarchy-lock-screen` | `kept` |
| `show_system_menu` | Suspend | `_(inline)_` | `kept` |
| `show_system_menu` | Suspend | `nomarchy-toggle-suspend` | `kept` |
| `show_system_menu` | Hibernate | `_(inline)_` | `kept` |
| `show_system_menu` | Logout | `nomarchy-system-logout` | `kept` |
| `show_system_menu` | Restart | `nomarchy-system-reboot` | `kept` |