How the Installer Works (End-to-End Flow)

Orchestrator: install.sh

The install.sh script acts as the central orchestrator for Omarchy’s automated installer. It exports key environment variables, updates the user’s PATH, and sources five sequential stages—Preflight, Packaging, Configuration, Login, and Finishing—to ensure a predictable, fully automated desktop setup on a fresh Arch Linux system.


Index


Orchestrator Overview

install.sh is the entry point for Omarchy’s installer. It:

  • Exits on any failure (set -eE).
  • Defines install paths.
  • Sources modular scripts in a fixed order for reliability.
#!/bin/bash
set -eE
OMARCHY_PATH="$HOME/.local/share/omarchy"
OMARCHY_INSTALL="$OMARCHY_PATH/install"
export PATH="$OMARCHY_PATH/bin:$PATH"
# Preparations
source $OMARCHY_INSTALL/preflight/show-env.sh
… 
# Finishings
source $OMARCHY_INSTALL/reboot.sh

Environment Setup

This initial section ensures all subsequent scripts run in the correct context.

Variable Description
OMARCHY_PATH Root directory where Omarchy is installed
OMARCHY_INSTALL Path to the installer modules (…/install)
PATH Prepends $OMARCHY_PATH/bin for Omarchy commands

Preflight Stage

Purpose: Validate system prerequisites and prepare for package installation.

Script Purpose
preflight/show-env.sh Prints key environment variables for debugging
preflight/trap-errors.sh Installs an error trap to allow retry on failure
preflight/guard.sh Ensures Arch, x86_64, non-root, and fresh installation requirements
preflight/chroot.sh Adapts systemctl enable for chroot vs. live installs
preflight/pacman.sh Installs base-devel, applies custom pacman.conf and mirrorlist
preflight/migrations.sh Initializes migration state to track one-time upgrades
preflight/first-run-mode.sh Marks “first-run” state and sets temporary sudoers for post-install

Each script is sourced in order to halt on errors and preserve context.


Packaging Stage

Purpose: Install core packages, fonts, editors, webapps, and TUIs.

Script Purpose
packages.sh Installs the curated list of system and AUR packages
packaging/fonts.sh Adds Omarchy logo font to the user’s font directory
packaging/lazyvim.sh Clones and configures LazyVim starter config
packaging/webapps.sh Registers Web Apps (e.g., ChatGPT, YouTube)
packaging/tuis.sh Installs terminal UIs (e.g., dust, lazydocker)

Modules here leverage helper functions like omarchy-pkg-add, omarchy-webapp-install, and omarchy-tui-install.


Configuration Stage

Purpose: Apply user and system configurations, themes, hardware tweaks, and developer tool setups.

Area Script Description
General Config config/config.sh Copies Omarchy defaults (e.g., Bashrc)
Theming & Branding config/theme.sh, config/branding.sh Sets Hyprland theme & branding files
Git & GPG config/git.sh, config/gpg.sh Configures Git aliases and GPG keyservers
Time & Locale config/timezones.sh Syncs system clock and timezones
Authentication Tweaks config/increase-sudo-tries.sh,increase-lockout-limit.sh Hardens PAM policies
SSH & Keyboard config/ssh-flakiness.sh,detect-keyboard-layout.sh,xcompose.sh Improves SSH reliability & input mappings
Language Runtimes config/mise-ruby.sh Installs Ruby versions via mise
Docker config/docker.sh Configures Docker daemon settings
Mimetypes & LocalDB config/mimetypes.sh, config/localdb.sh Sets file associations and simple DB files
ASD Control config/sudoless-asdcontrol.sh Enables running asdcontrol without sudo
Hardware config/hardware/*.sh Network, Bluetooth, NVIDIA, USB suspend tweaks

Each script is sourced to apply settings immediately.


Login Stage

Purpose: Configure system login experience and bootloader integration.

Script Purpose
login/plymouth.sh Installs and configures Plymouth splash screen
login/limine-snapper.sh Hooks Snapper snapshots into Limine bootloader
login/alt-bootloaders.sh Enables alternative bootloader entries

These modules ensure a seamless, branded login and rollback-ready boot process.


Finishing Stage

Purpose: Present a completion message and reboot the system to finalize installation.

Script Purpose
reboot.sh Clears the screen, displays “You’re done!”, then reboots

This final script removes installer sudoers, reminds users to eject media, and reboots.


Process Flow

flowchart LR
  A[Start: install.sh] --> B[Export Paths & Env]
  B --> C[Preflight]
  C --> D[Packaging]
  D --> E[Configuration]
  E --> F[Login]
  F --> G[Finishing]
  G --> H[Reboot System]

This flowchart visualizes how install.sh orchestrates each stage for a complete, automated Arch → Hyprland desktop setup.