Commit Graph
134 Commits
Author SHA1 Message Date
Ryan Hughes df645a202d Simplify finalize.sh and install.sh's preflight ownership
finalize.sh just does the in-target work: env setup, source helpers,
mark current migrations as done (idempotent), run packaging/config/
login/post-install. No preflight orchestration, no install_mode_is
offline branches.

install.sh (online) inlines the preflight bits that are online-specific:
guard.sh, begin.sh, show-env.sh. The first-run-mode setup that used to
live in preflight (offline-only) moves to an orchestrator phase in a
later chunk; disable-mkinitcpio.sh is obsolete entirely because the C3
phase ordering means the limine UKI hook fires exactly once with
correct config in place.

install/preflight/{all,disable-mkinitcpio,first-run-mode}.sh still
exist on disk but are no longer sourced. They'll get removed in a
later chunk once the orchestrator absorbs first-run-mode.
2026-06-04 18:34:35 -04:00
Ryan Hughes 2beda6abed Scaffold Python orchestrator + split install.sh / finalize.sh
Chunk 1 of the C3 refactor: replace the two-pass install model (archinstall
CLI + custom shell dance + chroot bash installer) with a single Python
orchestrator that owns phase ordering, using archinstall as a library
subsystem.

Splits the bash entry point into two:
- install.sh: online entry point. Ensures omarchy runtime + base.packages
  are installed/up to date, then exec's finalize.sh.
- finalize.sh: the in-target portion (preflight + packaging + config +
  login + post-install). Called by install.sh (online) AND by the
  orchestrator after arch-chroot -u $USER (offline).

Adds the orchestrator skeleton under install/orchestrator/:
- main.py: entry point, builds + runs the phase list
- context.py: InstallContext (parsed configurator JSON + invocation paths)
- phases.py: phase state machine (logging + state.json + error wrapping)
- phases_impl.py: stubbed phase implementations (filled in by chunks 2-6)
- archinstall_adapter.py: thin compat wall around archinstall lib imports
  (only this module imports from archinstall.*)
- ui.py: gum subprocess wrappers so the orchestrator keeps the same
  styled-terminal UX as the bash installer

Updates bin/omarchy-install to dispatch:
- --config <json> in args → python -m orchestrator.main (ISO install)
- anything else → bash install.sh (online rerun on installed system)

Concrete phase logic lands in subsequent chunks. All phases currently
raise NotImplementedError; the orchestrator imports cleanly and --help
works as a smoke check.
2026-06-04 18:34:35 -04:00
Ryan Hughes ad5c942725 install.sh: pacman -S omarchy-base.packages alongside omarchy meta
omarchy no longer hard-depends on the full install set; ensure_omarchy_runtime
now installs everything in install/omarchy-base.packages in addition to
the omarchy meta. Offline mode's assertion stays the same (the ISO does
the equivalent via .automated_script.sh).
2026-06-04 18:34:35 -04:00
Ryan Hughes 8e05d4d92a Move full-runtime dep to omarchy meta; thin omarchy-installer
Apollo-recommended dep split:
- omarchy-installer: bash gum jq git only (just the runner)
- omarchy: depends on omarchy-keyring + omarchy-settings + omarchy-limine
  + the runtime stack
- omarchy-settings, omarchy-limine: standalone

install.sh now installs the runtime (pacman -Syu --needed omarchy) before
sourcing preflight/all.sh in online mode, and asserts it's already
present in offline mode (ISO pacstraps it before user creation so
/etc/skel is populated).

boot.sh installs only omarchy-keyring + omarchy-installer (small + fast),
then exec's omarchy-install which handles the full-runtime pull.

User-visible effect: 'pacman -S omarchy-installer' now installs ~5 files
instead of the entire Omarchy stack. Users get a clean choice between
'I just want the installer' and 'I want the full Omarchy desktop'.
2026-06-04 18:34:35 -04:00
Ryan Hughes 81e81fe0c8 Address momus review of OMARCHY_INSTALL_MODE work
- install.sh: use realpath to follow symlinks when deriving OMARCHY_PATH
  from script location. Logical pwd left dev-link symlink chains pointing
  at the wrong dir; realpath resolves to the underlying checkout.
- install/helpers/mode.sh: validate explicit OMARCHY_INSTALL_MODE values
  and exit on typos. Also export_legacy_mode_flags now UNSETS the
  contradictory legacy flag for each mode so unmigrated callers can't
  see both OMARCHY_CHROOT_INSTALL=1 and OMARCHY_ONLINE_INSTALL=true.
- install/helpers/errors.sh: retry uses "$OMARCHY_PATH/install.sh"
  and preserves OMARCHY_INSTALL_MODE explicitly; the previous hardcoded
  ~/.local/share/omarchy/install.sh broke package-mode retries.
- bin/omarchy-install-mode: soften the summary; the helper only knows
  the current env, not any persisted post-install state.
2026-06-04 18:34:35 -04:00
Ryan Hughes 6f74091fb6 Make install.sh mode-aware with OMARCHY_INSTALL_MODE
Three modes the installer now branches on:

  iso-chroot      Running inside the new system's chroot from the ISO build.
                  pacman is configured by archinstall; systemd isn't running,
                  so service enables skip --now.
  online-package  Running on an existing Arch where the omarchy-* packages
                  are already installed. Skip base.sh and the bootstrap
                  preflight steps; only the per-host runtime ops in
                  config/login/post-install need to run.
  online-git      boot.sh path: clone into $HOME/.local/share/omarchy and
                  bootstrap everything from scratch.

install.sh derives OMARCHY_PATH from its own location, so the same script
works whether it's at /usr/share/omarchy/install.sh (package mode) or
$HOME/.local/share/omarchy/install.sh (git mode). install_mode_is helper
replaces direct ${OMARCHY_CHROOT_INSTALL:-} / ${OMARCHY_ONLINE_INSTALL:-}
checks in chroot.sh, finished.sh, errors.sh, mise-work.sh, preflight/pacman.sh.

Legacy vars still work through export_legacy_mode_flags, which sets
OMARCHY_CHROOT_INSTALL=1 / OMARCHY_ONLINE_INSTALL=true based on the
canonical mode for any caller that hasn't been updated.

bin/omarchy-install-mode prints the current mode for scripts/users that
need to introspect.

Smoke-tested all four entry paths (explicit mode, both legacy shims,
auto-detection from OMARCHY_PATH); each resolves correctly and the
legacy flags are exported in matching modes.
2026-06-04 18:34:35 -04:00
David Heinemeier Hansson 10f909fdfc Correct path 2025-09-13 18:02:07 +02:00
David Heinemeier Hansson 49ca5ee249 Quote them 2025-09-13 17:13:29 +02:00
David Heinemeier Hansson 8651f6d8b0 Let each segment declare its all 2025-09-13 17:12:43 +02:00
cfbc71c117 Add modifications to support Offline ISO (#1621)
* Change lazyvim and asdcontrol to packages

* Remove asdcontrol and lazyvim

* Add lazyvim setup

* Don't trigger rebuild. We already rebuild later.

* Add new pacman.conf after install

* Update config to keep mirrors in mirrorlist

* Add lazyvim setup back

* Make webapp installer work with local images

* Update tuis to work offline

* Update pacman config situation

* Extract the reboot segment into its own file

* Explainer

* Can't return in executed scripts

* Add post-install

* Extract the reboot segment into its own file

* Fix rebase doubling up

* Add run wrapper function for feedback

* Redirect output to log

* Move gnome updates to first-run

* Add theme to first-run

* Updat to try to get logging working

* Create the file and give permissions

* Test gsettings

* Revert "Test gsettings"

This reverts commit 49c27d319407f6c95fcbb4c5a2646e54b50c9ab4.

* Stop logging

* Add time outputs to end of logs

* Rearrange some scripts to cleanup

* Cleanup

* Add timing to run script

* Don't enable multilib for offline

* Add prebuild ruby

* Try spinner setup

* Prevent exit 1 due to grep not matching

* Update limine config to work for USB installs as well

* Add offline install to env report

* Fix grep pipefailure

* Update logs exports to work with subshells

* Fix backward logic

* Attempt to fix logging again

* Export chrootable for subshells

* Clean up outputs

* Move chrootable up

* Source chroot instead

* Changes for logging

* Center up reboot notice

* Update fixed paths

* Update trap

* Revert reverting precompiled ruby due to issues

* Revert "Revert reverting precompiled ruby due to issues"

This reverts commit c159e7dc51cfdd2fb750c49c66bc4468e1208446.

* Remove junk to cleanup fixed paths now that we have relative

* Add git branch check to transition beta to main

* Log output

* Add time output on summary screen

* We don't need sudo here

* Add ansi helpers to make code cleaner

* Add dry-run helpers for testing

* Split out some common / reused items

* Add log output function

* Use gum log to output cleaner

* Cleanup

* Update trap with options

* Fix reboot and pad it

* Cleanup

* Add dry-run for testing

* Use default $PADDING for gum

* More styles

* Styles and really exit

* Update to new format

* Add ansi vars

* Update log output to prevent flickering

* Fix logo exporting

* Trap updates

* Add exit handler

* Prevent double-trapping

* Update traps

* Consolidate logic

* Update reboot to work in chroot

* Eliminate double-guard

* Attempt to speed up by removing mkinitcpio hooks

* Add multilib for nvidia users

* Add back wireless-regdom

* Remove dryrun items

* Fix to be offline

* Set fonts for plymouth to solve freetype2 issue

* Required -y to run

* Update omarchy-refresh-plymouth to account for limine changes

* Update omarchy-refresh-plymouth to account for limine changes (#1575)

* Required -y to run

* Update omarchy-refresh-plymouth to account for limine changes

---------

Co-authored-by: David Heinemeier Hansson <david@hey.com>

* Update modes

* Remove direct executions of .sh files

* Add variable safety

* Add omarchy-upload-log

* Add broadcome fix for MBP

* Prevent printing on screen when rebooting

* Make packages list universal

* Rename

* Remove retry message

* Fix packages target

* Add system info to upload

* Update variable name

* Remove unnecessary executable statuses

* Remove gesture default

* Add bcm4360 fix to install

* Add useful debug info

* Add OMARCHY_PATH

* Only look locally offline

* Rename / rearrange files

* Export so they're available to subshells

* Update for alternate

* Rearrange

* Log install time if no arch

* Add limine to packages list

* Update comments

* Update sizing method

* Update mode switcher

* Move icons to be embedded in installer

* Set install mode to online

* shebang and sudo

* Remove deleted branch check

* Elim banners

* Elim verbosity

* Rename LOG_FILE

* Multilib on by default

* Flip to positive

* Switch to gnome-theme.sh for first run

* Elim ansi-codes helper

* Move guard up to be the first thing that's hit

* Extract a couple of functions

* Trim

* Trim

* Move back to trap

* Update to single gum file

* Just show total

* Pulled function to a helper

* Extract explaining function

* Use complete conditional flows where possible

* Reference variable close to its use

* Use modern bash conditional syntax

* Comment before function

* Use a simpler shared exit headline

Doesn't matter how we stopped, just that we did

* CRs

* Keep constants together

* Style on comment

* Explain QR Code

* Modern bash conditional and use lowercase for all local variables

* Use bash calculation syntax for numbers

* Use calculation syntax where possible

* cleanup was not intention revealing enough imo

* Spacing

* Retry won't produce something different in offline mode

* Not needed

* Use modern bash conditional style

* String-wrapping not needed in [[ ]]

* Might as well use constants for all of these

* Don't need the wrapping

* Move the output saving into where we're working with it

* Not needed as long as we just source this

* Gum is a helper

* Slim down logging setup

* Reflect broader scope of work

* Everything should live in file

* Simpler

* Ordering

* Style

* Better separation of concerns

* Stop pretending these are meant to run directly

* Move all packaging execution together

* No longer used in an offline centric setup

* None of these are directly executable any more either

* Modern bash conditional

* Better name

* Explain what's going on

* Use modern bash conditional

* Use modern bash styule

* No need for bashing

---------

Co-authored-by: David Heinemeier Hansson <david@hey.com>
Co-authored-by: DoppioJP <jakub@doppio.jp>
2025-09-13 16:42:00 +02:00
e79cfa76a8 Include wireless-regdb to resolve #1083 (#1279)
* Add wireless-regdb alongside iwd

Needed for regulatory compliance for Wi-Fi and enabling some bands on some chipsets

* Add wireless-regdb

* Changed location of wireless-regdb install

* configure the wireless-regdom during install

* remove extra newline

* don't unset the variable too early

* also set the region as part of the script

* writing to wireless-regdom requires root

* need to use tee

* changing logic since this is brought in as source

* handle timezones that start with country code already

---------

Co-authored-by: Nirav Patel <eclecticc@users.noreply.github.com>
2025-09-09 20:13:14 +02:00
a8a907791b Install video acceleration for intel GPUs (#1368)
* install the needed packages for intel GPUs

* keep forgetting that this is included by source

---------

Co-authored-by: Nirav Patel <eclecticc@users.noreply.github.com>
2025-09-09 20:04:22 +02:00
David Heinemeier Hansson 6d832cba42 Reapply "Make fixing the F13 AMD audio input just a thing that happens"
This reverts commit a5814e0bfd.
2025-08-31 15:50:24 +02:00
David Heinemeier Hansson 8610f4f9da Explainer 2025-08-31 15:41:55 +02:00
David Heinemeier Hansson 4bdbb06cfc Extract the reboot segment into its own file 2025-08-31 15:41:32 +02:00
David Heinemeier Hansson a5814e0bfd Revert "Make fixing the F13 AMD audio input just a thing that happens"
This reverts commit c6cd49a0aa.
2025-08-31 15:35:43 +02:00
David Heinemeier Hansson 37d59ca78e Use our own asdcontrol-git package now 2025-08-31 14:46:06 +02:00
David Heinemeier Hansson c6cd49a0aa Make fixing the F13 AMD audio input just a thing that happens 2025-08-31 14:31:15 +02:00
David Heinemeier Hansson 8dd7c7a94e Make default ENVs available here and reuse 2025-08-31 13:53:06 +02:00
David Heinemeier Hansson 927abd86ba Be more specific
This is pacman land!
2025-08-31 12:41:33 +02:00
David Heinemeier Hansson a34b7bd131 Remove entirely 2025-08-28 06:58:10 +02:00
David Heinemeier Hansson 42f7f5f558 Hopefully no longer needed 2025-08-28 06:38:48 +02:00
David Heinemeier Hansson 2294393d71 Just force it for now 2025-08-27 12:39:36 +02:00
David Heinemeier Hansson 0f8a94aa50 Pin at the end 2025-08-27 12:26:03 +02:00
David Heinemeier HanssonandGitHub 742e601baf Pinning packages when one goes bad (#1162)
* Don't update system packages to prevent issues from something too new at the wrong time

* Add system to pin and ignore bad packages

To deal with the abseil-cpp issue
2025-08-27 12:06:08 +02:00
David Heinemeier Hansson a7df6c0941 Move updatedb into its own config file with better explanation 2025-08-27 10:53:47 +02:00
David Heinemeier Hansson 062c6b3dce Tweaks 2025-08-25 11:11:08 +02:00
David Heinemeier Hansson 68a51c18a8 Start splitting up the big config folder 2025-08-25 11:09:15 +02:00
David Heinemeier Hansson 5b59aee51e Reduce number of concepts 2025-08-25 11:04:28 +02:00
David Heinemeier Hansson 5bb7b66dee Bring back tte celebration at the end 2025-08-25 09:49:45 +02:00
David Heinemeier Hansson 705b6858dc Order 2025-08-25 09:31:07 +02:00
David Heinemeier Hansson b9758a9c8c Part of repository setup 2025-08-25 09:30:36 +02:00
David Heinemeier Hansson 37f0c18b78 All packages in one place 2025-08-25 09:22:55 +02:00
David Heinemeier Hansson c73c1c90bf Extra all packages into a single master manifest 2025-08-25 09:04:13 +02:00
David Heinemeier Hansson 2d848338e6 More restrictive sudoless setup for first-run 2025-08-25 07:49:16 +02:00
David Heinemeier Hansson f98899e4e2 Setup real first-run install 2025-08-25 07:37:46 +02:00
David Heinemeier Hansson 661eed2640 Prepare for firewall to be setup on first run 2025-08-25 07:28:59 +02:00
David Heinemeier Hansson 28ba0bff7a Prepare for battery monitor to be installed on first run 2025-08-25 07:26:25 +02:00
David Heinemeier Hansson 9a98782342 Run first so app directory is there 2025-08-25 07:15:45 +02:00
David Heinemeier Hansson fc853ffe96 Combine repository setups 2025-08-24 20:10:43 +02:00
David Heinemeier Hansson a8c3d1a2bd Right now we are just built for online installer 2025-08-24 20:10:03 +02:00
David Heinemeier Hansson b09c625ac0 Make it green! 2025-08-24 20:09:18 +02:00
David Heinemeier Hansson 478b166ae7 Can't use tte at the moment here 2025-08-24 18:37:54 +02:00
David Heinemeier Hansson 57e14afca3 No yay 2025-08-24 17:28:12 +02:00
David Heinemeier Hansson 664fb7c51a Separate pacman setup from aur and make aur optional 2025-08-24 17:20:13 +02:00
David Heinemeier Hansson 9ed755b445 This will have to wait 2025-08-24 11:23:44 +02:00
David Heinemeier Hansson 438156e36f More protections 2025-08-24 11:10:06 +02:00
David Heinemeier Hansson 574d213c34 Ensure better trap behavior 2025-08-24 11:05:11 +02:00
David Heinemeier Hansson fbf9a19574 Show installation env for debugging 2025-08-24 07:40:16 +02:00
David Heinemeier Hansson 2ae973108d Extract error trapping to its own file 2025-08-24 07:21:49 +02:00