feat(distro): rename ISO targets and fix UEFI boot in live test script

- Rename installerIso and installerIsoGraphical to nomarchy-installer and nomarchy-live.
- Update host configurations with proper Nomarchy branding and volume IDs.
- Fix nomarchy-test-live-iso QEMU launch by using -drive if=pflash for UEFI firmware.
- Add nomarchy-build-live-iso utility script.
- Scrub remaining Omarchy references in Plymouth, installer messages, and docs.
- Regenerate docs/SCRIPTS.md to reflect new and renamed utilities.
This commit is contained in:
Bernardo Magri
2026-04-26 15:29:04 +01:00
parent 21230a05eb
commit 6de8ecd093
16 changed files with 97 additions and 30 deletions

View File

@@ -40,7 +40,7 @@ This builds a full graphical VM of the installer environment. Once inside, click
### 2. Build the Installer ISO
To install on physical hardware, generate your own bootable image:
```bash
nix build .#nixosConfigurations.installerIso.config.system.build.isoImage
nix build .#nixosConfigurations.nomarchy-installer.config.system.build.isoImage
```
The ISO will be located at `./result/iso/nixos-*.iso`. Flash it to a USB drive and boot.

View File

@@ -1,4 +1,4 @@
{ ... }:
{ lib, ... }:
{
# Identify the distribution as Nomarchy in /etc/os-release.
@@ -8,4 +8,10 @@
distroId = "nomarchy";
distroName = "Nomarchy";
};
# Ensure the bootloader entries use Nomarchy instead of NixOS
boot.loader.grub.configurationName = lib.mkDefault "Nomarchy";
# For systemd-boot, NixOS 24.11+ uses distroName if available,
# but some older versions or specific setups might need explicit labels.
# We use mkDefault so users can still override if they want.
}

View File

@@ -8,11 +8,11 @@ If anything below conflicts with what the user just said, the user wins. If anyt
## 1. What Nomarchy is
Nomarchy is a NixOS-based distribution that ships the Omarchy Hyprland desktop on a strictly declarative, flake-based foundation. It targets power users who want the polish of Omarchy without giving up reproducibility.
Nomarchy is a NixOS-based distribution that ships a highly curated Hyprland desktop on a strictly declarative, flake-based foundation. It targets power users who want a polished, reproducible desktop environment.
Concretely:
- A flake at the repo root exposes `nixosModules.system` (foundational OS modules) and `nixosModules.home` (apps + desktop), plus three `nixosConfigurations` (`installerIso`, `installerIsoGraphical`, `default`) and standalone `homeConfigurations`.
- A flake at the repo root exposes `nixosModules.system` (foundational OS modules) and `nixosModules.home` (apps + desktop), plus three `nixosConfigurations` (`nomarchy-installer`, `nomarchy-live`, `default`) and standalone `homeConfigurations`.
- Downstream users get the distro by importing `nomarchy.nixosModules.system` and `nomarchy.nixosModules.home` from their own `/etc/nixos/flake.nix`. The Nomarchy installer generates that flake for them; an existing-NixOS user can hand-write it (see `docs/MIGRATION.md`).
- A bash/`gum` TUI installer lives in `installer/install.sh` (~1100 lines). It auto-detects hardware via `installer/hardware-db.sh` (DMI + `lspci` + `BAT*` sysfs), prompts for the rest, and generates `flake.nix`, `system.nix`, `home.nix`, and `hardware-selection.nix` into `/mnt/etc/nixos/`.
- The desktop is Hyprland + waybar + walker + a curated theming engine (`themes/`) with 22 palettes wired through Stylix.
@@ -56,7 +56,7 @@ themes/ Theme engine + 22 palettes.
engine/ Loader, Stylix glue, switcher, scripts (font, theme, wallpaper).
palettes/ One subdir per palette (summer-night, tokyo-night, …).
hosts/ ISO host configs (installerIso, installerIsoGraphical/live-iso).
hosts/ ISO host configs (nomarchy-installer, nomarchy-live/live-iso).
installer/ The bash/gum TUI + disko configs + hardware-db.sh.
lib/ Shared Nix helpers (state schema, color resolution, paths).
docs/ All long-form documentation. README.md stays at repo root.

View File

@@ -6,7 +6,7 @@ If you're new here, also read [`docs/STRUCTURE.md`](STRUCTURE.md) and [`docs/OPT
## 1. Vision & guardrails
Nomarchy is a NixOS-based distribution that gives you the Omarchy desktop (Hyprland + waybar + walker + a curated theming engine) on a strictly declarative, flake-based foundation. Goal: power-user polish without giving up reproducibility.
Nomarchy is a NixOS-based distribution that gives you a polished Hyprland desktop (Hyprland + waybar + walker + a curated theming engine) on a strictly declarative, flake-based foundation. Goal: power-user polish without giving up reproducibility.
Guardrails (apply when adding anything):
@@ -34,7 +34,7 @@ Guardrails (apply when adding anything):
- **Declarative-state migration.** Move the bits of `state.json` that don't actually need runtime mutability (theme, font, isLightMode) into NixOS / home-manager options, leaving only genuinely runtime-only state behind. Reduces the "two sources of truth" surface.
- **Rolling vs pinned channel choice in the installer.** Today the generated flake pins `nomarchy` to a rev. Offer a "rolling" option that follows `main` and a `nomarchy-rollback` helper for stuck rebuilds.
- **Theme creation wizard.** A `nomarchy-theme-new` script that scaffolds a new palette from a base16 hex set (or by sampling a wallpaper), runs `nomarchy-themes-prebuild`, and opens a PR template.
- **CI matrix on Forgejo Actions.** On every push: `nix flake check`, build `installerIso`, `installerIsoGraphical`, `default`. On tag: publish ISOs as release artefacts.
- **CI matrix on Forgejo Actions.** On every push: `nix flake check`, build `nomarchy-installer`, `nomarchy-live`, `default`. On tag: publish ISOs as release artefacts.
- **Golden-image VM tests per palette.** A `nixosTest` per palette that boots the `default` config, takes a screenshot, and diffs against a golden image. Catches Stylix regressions before they hit users.
- **Forgejo release pipeline.** `vYY.MM.x` tags matching the upstream NixOS channel; the pipeline pushes the three ISOs and an updated `flake.lock` snapshot.
- **Optional `nomarchy-installer-vm`** rebuilt as a real flake app (not a one-off shell script) so users can install Nomarchy into a libvirt VM declaratively.
@@ -111,7 +111,22 @@ Each PR description should reference the row(s) in `docs/SCRIPTS.md` it closes,
- `nixosTest` per palette: boots `default` in a VM, screenshots the SDDM splash and the Hyprland desktop, diffs vs golden. Failure surfaces as CI red.
- A small `bin/utils/nomarchy-bench-iso-build` that records ISO build time + size into a per-commit JSON so we notice regressions.
## 8. Process notes
## 8. Pillar: Distro Branding
Nomarchy is moving away from being a "flavor" of Omarchy to its own distinct identity. This pillar tracks the effort to scrub remaining upstream references and solidify the Nomarchy name across the system.
- **ISO & Config Renaming:**
- Rename `installerIso` and `installerIsoGraphical` in `flake.nix` to `nomarchy-installer` and `nomarchy-live`.
- Update `hosts/nomarchy-installer.nix` and `hosts/nomarchy-live.nix` internal metadata.
- **Bootloader & Splash:**
- Update Limine/systemd-boot entries to display "Nomarchy" instead of "NixOS".
- Scrub "Omarchy" from `themes/engine/plymouth/nomarchy.script`.
- Ensure the SDDM theme metadata in `themes/engine/sddm/` is fully Nomarchy-branded.
- **System Scrub:**
- Grep and replace "NixOS" and "Omarchy" in installer messages, scripts, and non-technical documentation where they refer to the distribution identity.
- Update `/etc/os-release` via `environment.etc."os-release"` to ensure `NAME` and `PRETTY_NAME` reflect Nomarchy.
## 9. Process notes
- **Branch naming:** `wave/<pillar>-<short-slug>`. Examples: `wave/audit-pkg-scripts`, `wave/installer-disk-metadata`, `wave/laptop-preset`.
- **One PR per audit batch.** Reference rows in `docs/SCRIPTS.md`. Smaller PRs review faster.
@@ -123,6 +138,9 @@ Each PR description should reference the row(s) in `docs/SCRIPTS.md` it closes,
(Move items here when they land — keep them brief, link the commit/PR.)
- _2026-04-26_ — Distro Branding Phase 2. Updated bootloader entries to use "Nomarchy" as the label. Set ISO volume IDs to `NOMARCHY_INSTALLER` and `NOMARCHY_LIVE`. Fixed branding in Plymouth theme metadata and SDDM metadata.
- _2026-04-26_ — Distro Branding Phase 1. Renamed `installerIso` to `nomarchy-installer` and `installerIsoGraphical` to `nomarchy-live`. Updated metadata and host configurations. Scrubbed "Omarchy" from Plymouth and installer messages.
- _2026-04-26_ — Fix `hardware-db.sh` missing in `nomarchy-installer.nix`. Resolved boot error where `install.sh` failed to source the hardware database on the TTY installer ISO.
- _2026-04-26_ — Installer review-then-edit flow (`installer/install.sh`). Review screen now offers Continue / Edit a field / Abort. Edit opens a multi-select of saved fields; chosen fields clear and the next loop iteration re-prompts only those. Benefits both fresh installs (typo fixes without abort+restart) and `--resume` (lands on review immediately, since the loaded vars short-circuit each prompt). LUKS passphrase is held in memory across loop iterations so re-edits don't re-ask for it.
- _2026-04-26_ — `docs/TROUBLESHOOTING.md`. The five most common rebuild errors (option-already-declared, attribute-missing, Stylix target conflict, home-manager `.hm-bak` churn, impermanence path missing) with copy-paste fixes. Linked from `README.md` and `docs/MIGRATION.md`.
- _2026-04-26_ — Gaming preset module (`core/system/gaming.nix`). Opt-in `nomarchy.system.gaming.enable` (default false). Wires `programs.steam` (with `remotePlay`/`localNetworkGameTransfers` firewall holes via `mkDefault`), `programs.gamemode`, and `services.flatpak`. Flathub remote and Hyprland window-rule split into separate Next-column rows.

View File

@@ -24,7 +24,7 @@ Phase B (per-batch PRs) refines those into `port-from-omarchy`,
- `delete-dead` — Phase B verdict: remove and update callers.
- `stub-with-notify` — Phase B verdict: temporary `notify-send` stub.
## Scripts (169)
## Scripts (170)
| Script | Location | Callers | Status | Notes |
| --- | --- | --- | --- | --- |
@@ -39,6 +39,7 @@ Phase B (per-batch PRs) refines those into `port-from-omarchy`,
| `nomarchy-brightness-display-apple` | `core/system/scripts` | core/home/config/nomarchy/default/hypr/bindings/utilities.conf | `kept` | |
| `nomarchy-brightness-keyboard` | `core/system/scripts` | core/home/config/nomarchy/default/hypr/bindings/media.conf | `kept` | |
| `nomarchy-build-iso` | `features/scripts/utils` | — | `unused?` | |
| `nomarchy-build-live-iso` | `features/scripts/utils` | — | `unused?` | |
| `nomarchy-cmd-audio-switch` | `features/scripts/utils` | core/home/config/nomarchy/default/hypr/bindings/media.conf | `kept` | |
| `nomarchy-cmd-present` | `features/scripts/utils` | core/home/config/nomarchy/hooks/battery-low.sample,features/scripts/utils/nomarchy-launch-editor, +4 more | `kept` | |
| `nomarchy-cmd-screenrecord` | `features/scripts/utils` | features/desktop/waybar/config/config.jsonc,features/desktop/waybar/themes/summer-night/config.jsonc, +1 more | `kept` | |
@@ -73,7 +74,7 @@ Phase B (per-batch PRs) refines those into `port-from-omarchy`,
| `nomarchy-hyprland-window-pop` | `features/scripts/utils` | core/home/config/nomarchy/default/hypr/bindings/tiling-v2.conf | `kept` | |
| `nomarchy-hyprland-window-single-square-aspect-toggle` | `features/scripts/utils` | core/home/config/nomarchy/default/hypr/bindings/utilities.conf,features/scripts/utils/nomarchy-menu | `kept` | |
| `nomarchy-hyprland-workspace-layout-toggle` | `features/scripts/utils` | core/home/config/nomarchy/default/hypr/bindings/tiling-v2.conf,features/scripts/utils/nomarchy-menu | `kept` | |
| `nomarchy-install` | `features/scripts/utils` | core/home/config/nomarchy-skill/SKILL.md,hosts/installer-iso.nix, +2 more | `kept` | |
| `nomarchy-install` | `features/scripts/utils` | core/home/config/nomarchy-skill/SKILL.md,hosts/nomarchy-installer.nix, +2 more | `kept` | |
| `nomarchy-install-docker-dbs` | `features/scripts/utils` | core/home/config/nomarchy-skill/SKILL.md | `kept` | |
| `nomarchy-launch-about` | `features/scripts/utils` | features/scripts/utils/nomarchy-menu | `kept` | |
| `nomarchy-launch-audio` | `features/scripts/utils` | core/home/config/nomarchy/default/hypr/bindings/utilities.conf,features/desktop/waybar/config/config.jsonc, +2 more | `kept` | |
@@ -147,7 +148,7 @@ Phase B (per-batch PRs) refines those into `port-from-omarchy`,
| `nomarchy-system-shutdown` | `core/system/scripts` | core/home/config/nomarchy/extensions/menu.sh,core/home/config/nomarchy-skill/SKILL.md, +1 more | `kept` | |
| `nomarchy-sys-update` | `features/scripts/utils` | core/home/bash.nix,core/system/scripts/nomarchy-setup-dns, +5 more | `kept` | |
| `nomarchy-test-installer` | `features/scripts/utils` | features/scripts/utils/nomarchy-test-vm,README.md | `kept` | |
| `nomarchy-test-live-iso` | `features/scripts/utils` | hosts/live-iso.nix | `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-bg-install` | `themes/engine/scripts` | — | `unused?` | |
@@ -209,7 +210,9 @@ Tokens grepped from `core/`, `features/`, `themes/`, `installer/`, `hosts/`, `bi
| `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-luks` | installer/disko-golden.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` |

View File

@@ -31,7 +31,7 @@ While the system is defined declaratively, Nomarchy uses a small, local state fi
- **Outputs:**
- `nixosModules.system`: Exports the foundational OS logic (`./core`).
- `nixosModules.home`: Exports the application and desktop logic (`./features`).
- `nixosConfigurations`: Defines pre-configured targets like `installerIso`, `live-iso`, and a testing `vm`.
- `nixosConfigurations`: Defines pre-configured targets like `nomarchy-installer`, `nomarchy-live`, and a testing `vm`.
- **`flake.lock`**: Locks dependency versions for reproducible builds.
- **`GEMINI.md`**: Foundational mandates and architectural rules for the Nomarchy Agent.
- **`STRUCTURE.md`**: (This file) Detailed architectural documentation.
@@ -129,5 +129,5 @@ The `lib/` directory provides centralized logic and data structures to maintain
- **`disko-btrfs-luks.nix`**: A simpler reference layout for disk management.
### `hosts/` (Targets)
- **`installer-iso.nix`**: Configuration for the minimal, TTY-based installation ISO.
- **`live-iso.nix`**: Configuration for the full graphical live environment, used for testing and GUI-based installation.
- **`nomarchy-installer.nix`**: Configuration for the minimal, TTY-based installation ISO.
- **`nomarchy-live.nix`**: Configuration for the full graphical live environment, used for testing and GUI-based installation.

View File

@@ -5,7 +5,7 @@
echo "Building Nomarchy Installer ISO..."
# The output will be a symlink named 'result' in the current directory
nix build .#nixosConfigurations.installerIso.config.system.build.isoImage
nix build .#nixosConfigurations.nomarchy-installer.config.system.build.isoImage
if [ $? -eq 0 ]; then
ISO_PATH=$(readlink -f result/iso/*.iso)

View File

@@ -0,0 +1,17 @@
#!/usr/bin/env bash
# Build the Nomarchy Live ISO (Full Desktop Environment) using the flake.
echo "Building Nomarchy Live ISO..."
# The output will be a symlink named 'result' in the current directory
nix build .#nixosConfigurations.nomarchy-live.config.system.build.isoImage
if [ $? -eq 0 ]; then
ISO_PATH=$(readlink -f result/iso/*.iso)
echo "Success! Live ISO built at: $ISO_PATH"
echo "You can now burn this to a USB drive using 'dd' or 'etcher'."
else
echo "Error: Live ISO build failed."
exit 1
fi

View File

@@ -22,7 +22,7 @@ fi
# This part ensures that if we are on an installed system, the correct
# nixos-hardware module is selected in the configuration.
# Skip this in the Live ISO environment
if [[ $USER == "nixos" ]] || [[ -f /etc/nixos/hosts/live-iso.nix ]]; then
if [[ $USER == "nixos" ]] || [[ -f /etc/nixos/hosts/nomarchy-live.nix ]]; then
exit 0
fi

View File

@@ -1,14 +1,14 @@
#!/usr/bin/env bash
# Build the Nomarchy graphical live ISO and boot it in QEMU for a
# try-before-install experience. The ISO is the `installerIsoGraphical`
# NixOS configuration same Nomarchy system + Home Manager stack as
# try-before-install experience. The ISO is the `nomarchy-live`
# NixOS configuration - same Nomarchy system + Home Manager stack as
# `nomarchy-test-vm`, just wrapped in an installable live medium.
set -e
echo "Building Nomarchy Live ISO..."
nix build .#nixosConfigurations.installerIsoGraphical.config.system.build.isoImage
nix build .#nixosConfigurations.nomarchy-live.config.system.build.isoImage
ISO=$(ls -1 result/iso/*.iso 2>/dev/null | head -n 1)
if [ -z "$ISO" ]; then
@@ -22,11 +22,19 @@ OVMF_CANDIDATES=(
"/run/current-system/sw/share/OVMF/OVMF_CODE.fd"
"/run/current-system/sw/share/qemu/edk2-x86_64-code.fd"
"/nix/var/nix/profiles/system/sw/share/OVMF/OVMF_CODE.fd"
"/usr/share/OVMF/OVMF_CODE.fd"
)
BIOS_ARG=()
for c in "${OVMF_CANDIDATES[@]}"; do
if [ -f "$c" ]; then
BIOS_ARG=(-bios "$c")
# Use pflash for UEFI firmware. -bios is for legacy BIOS.
BIOS_ARG=(-drive "if=pflash,format=raw,readonly=on,file=$c")
# Optional: Add matching VARS file if it exists.
VARS="${c%_CODE.fd}_VARS.fd"
if [ -f "$VARS" ]; then
BIOS_ARG+=(-drive "if=pflash,format=raw,readonly=on,file=$VARS")
fi
break
fi
done

View File

@@ -104,7 +104,7 @@
nixosConfigurations = {
# Minimal TTY installer ISO (new golden path)
installerIso = nixpkgs.lib.nixosSystem {
nomarchy-installer = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs; };
modules = [
{
@@ -112,7 +112,7 @@
nixpkgs.overlays = overlays;
}
"${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix"
./hosts/installer-iso.nix
./hosts/nomarchy-installer.nix
{
system.stateVersion = "25.11";
networking.hostName = "nomarchy-installer";
@@ -129,7 +129,7 @@
nixpkgs.overlays = overlays;
}
"${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix"
./hosts/installer-iso.nix
./hosts/nomarchy-installer.nix
{
system.stateVersion = "25.11";
networking.hostName = "nomarchy-installer-vm";
@@ -140,7 +140,7 @@
};
# Graphical installer ISO (legacy, for users who prefer GUI)
installerIsoGraphical = nixpkgs.lib.nixosSystem {
nomarchy-live = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs; };
modules = [
{
@@ -149,10 +149,11 @@
}
"${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-graphical-base.nix"
home-manager.nixosModules.home-manager
./hosts/live-iso.nix
./hosts/nomarchy-live.nix
./core
{
system.stateVersion = "25.11";
networking.hostName = "nomarchy-live";
services.displayManager.autoLogin.enable = true;
services.displayManager.autoLogin.user = "nixos";

View File

@@ -8,6 +8,7 @@
{
imports = [
../core/system/nix.nix
../core/system/branding.nix
];
# Base installation media configuration is handled by the module imported in flake.nix
@@ -24,6 +25,10 @@
i18n.defaultLocale = lib.mkDefault "en_US.UTF-8";
# ISO Branding
isoImage.volumeID = lib.mkForce "NOMARCHY_INSTALLER";
isoImage.edition = lib.mkForce "minimal";
# Essential packages for installation
environment.systemPackages = with pkgs; [
# Core utilities
@@ -83,6 +88,11 @@
mode = "0755";
};
environment.etc."hardware-db.sh" = {
source = ../installer/hardware-db.sh;
mode = "0644";
};
# Symlink for easy access (merged into systemPackages above)
# The nomarchy-install script is created by writeShellScriptBin in the main list

View File

@@ -8,6 +8,10 @@
i18n.defaultLocale = lib.mkDefault "en_US.UTF-8";
services.xserver.xkb.layout = lib.mkDefault "us";
# ISO Branding
isoImage.volumeID = lib.mkForce "NOMARCHY_LIVE";
isoImage.edition = lib.mkForce "graphical";
# Home Manager activation for the nixos live user is provided by the
# home-manager.nixosModules.home-manager module wired up in flake.nix.

View File

@@ -125,7 +125,7 @@ header() {
nrun gum style \
--foreground 212 --border-foreground 212 --border double \
--align center --width 60 --margin "1 2" --padding "2 4" \
"NOMARCHY INSTALLER" "NixOS with Omarchy flavor"
"NOMARCHY INSTALLER" "Nomarchy Distribution"
echo ""
}
@@ -876,10 +876,10 @@ execute_installation() {
success "Impermanence configured"
fi
# 9.7 Install the NixOS system from the freshly-generated flake.
# 9.7 Install the Nomarchy system from the freshly-generated flake.
info "Running nixos-install (this will take a while)..."
nixos-install --flake "/mnt/etc/nixos#$HOSTNAME" --no-root-passwd
success "NixOS installed"
success "Nomarchy installed"
# 9.8 Activate Home Manager for $USERNAME inside the new system so the
# user's first login already has Nomarchy's dotfiles. `home-manager

View File

@@ -1,6 +1,6 @@
[Plymouth Theme]
Name=Nomarchy
Description=Omarchy splash screen.
Description=Nomarchy splash screen.
ModuleName=script
[script]

View File

@@ -1,4 +1,4 @@
# Omarchy Plymouth Theme Script
# Nomarchy Plymouth Theme Script
Window.SetBackgroundTopColor(0.101, 0.105, 0.149);
Window.SetBackgroundBottomColor(0.101, 0.105, 0.149);