Project Layout: Installer Modules (install/)

This section details the install/ directory, which houses all Bash-driven installer modules. These scripts orchestrate a fresh Arch Linux system transformation into a Hyprland desktop with curated packages, developer tools, themes, and sensible defaults.

Index

Directory Structure

This table outlines where installer scripts live and their responsibilities.

Path Description
install.sh Main orchestrator sourcing all module groups.
install/preflight/ Pre-installation checks and environment setup.
install/packaging/ System and AUR package installation scripts.
install/config/ User and system configuration scripts (dotfiles, services, etc.).
install/login/ Login, splash screen, and bootloader integration.
install/reboot.sh Finalizes install and reboots the system.

Main Entry Point

The install.sh script drives the entire installation sequence. It defines paths, sets PATH, then sources module scripts in order.

#!/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
source $OMARCHY_INSTALL/preflight/trap-errors.sh
source $OMARCHY_INSTALL/preflight/guard.sh
source $OMARCHY_INSTALL/preflight/chroot.sh
source $OMARCHY_INSTALL/preflight/pacman.sh
source $OMARCHY_INSTALL/preflight/migrations.sh
source $OMARCHY_INSTALL/preflight/first-run-mode.sh

# Packaging
source $OMARCHY_INSTALL/packages.sh
source $OMARCHY_INSTALL/packaging/fonts.sh
source $OMARCHY_INSTALL/packaging/lazyvim.sh
source $OMARCHY_INSTALL/packaging/webapps.sh
source $OMARCHY_INSTALL/packaging/tuis.sh

# Configuration
source $OMARCHY_INSTALL/config/config.sh
source $OMARCHY_INSTALL/config/theme.sh
# …other config scripts…

# Login
source $OMARCHY_INSTALL/login/plymouth.sh
source $OMARCHY_INSTALL/login/limine-snapper.sh
source $OMARCHY_INSTALL/login/alt-bootloaders.sh

# Finishing
source $OMARCHY_INSTALL/reboot.sh

(Excerpt from install.sh)

Preflight Checks

Preflight modules perform environment verification, apply pacman defaults, and prepare for a smooth install:

  • show-env.sh: Prints critical environment variables.
  • trap-errors.sh: Catches failures and prompts retry.
  • guard.sh: Ensures Vanilla Arch, non-root, x86_64, no existing desktop.
  • chroot.sh: Supports chroot mode toggling for systemctl.
  • pacman.sh: Installs base-devel and applies default pacman.conf/mirrorlist.
  • migrations.sh: Sets up migration state tracking.
  • first-run-mode.sh: Marks post-install state and configures sudo rules.

Packaging Modules

These scripts install system and AUR packages via pacman and helper functions:

  • packages.sh: Top-level packaging logic.
  • fonts.sh: Installs Omarchy logo font for Waybar.
  • lazyvim.sh: Sets up Neovim via LazyVim starter.
  • webapps.sh: Registers common webapps (Discord, ChatGPT, Zoom).
  • tuis.sh: Installs TUI tools (e.g., dust, lazydocker).
  • pins.sh: Pins problematic packages to specific versions.

Configuration Modules

Configuration scripts apply user and system settings, dotfiles, and services:

  • config.sh: Deploys core configs and .bashrc.
  • theme.sh: Applies Hyprland themes (not shown).
  • branding.sh: Copies Omarchy logos and about text.
  • git.sh: Configures global Git aliases and user identity.
  • gpg.sh, timezones.sh, ssh-flakiness.sh, detect-keyboard-layout.sh, etc.

Hardware and service tweaks live under config/hardware/:

  • nvidia.sh: Sets up NVIDIA drivers for Hyprland.
  • usb-autosuspend.sh, fix-fkeys.sh, bluetooth.sh, …

Login Integration

Scripts to configure splash screens, bootloader, and automatic login:

  • plymouth.sh: Configures Plymouth splash on boot.
  • limine-snapper.sh: Ties Limine bootloader to Snapper snapshots.
  • alt-bootloaders.sh: Adds fallback boot entries.

Finishing Step

  • reboot.sh: Clears sudo rules, displays “Done!” animation, and reboots.

Installer Flowchart

flowchart LR
  A[install.sh] --> P[Preflight]
  P --> B[Packaging]
  B --> C[Configuration]
  C --> L[Login]
  L --> F[Finishing]

  subgraph Preflight
    SE[show-env.sh]
    TE[trap-errors.sh]
    G[guard.sh]
    CH[chroot.sh]
    PC[pacman.sh]
    MI[migrations.sh]
    FR[first-run-mode.sh]
    SE --> TE --> G --> CH --> PC --> MI --> FR
  end

  subgraph Packaging
    PKG[packages.sh]
    FT[fonts.sh]
    LV[lazyvim.sh]
    WA[webapps.sh]
    TU[tuis.sh]
    PI[pins.sh]
    PKG --> FT --> LV --> WA --> TU --> PI
  end

  subgraph Configuration
    CFG[config.sh] --> TH[theme.sh] --> BR[branding.sh] --> GT[git.sh]
    GT --> ... --> HW[hardware scripts]
  end

  subgraph Login
    PL[plymouth.sh] --> SN[limine-snapper.sh] --> AB[alt-bootloaders.sh]
  end

  subgraph Finishing
    RB[reboot.sh]
  end

This layout ensures a modular, maintainable, and readable installer where each concern is isolated in its own script.