Fix first-run login loop caused by unpackaged user units - #367
Open
megabyte0x wants to merge 7 commits into
Open
Fix first-run login loop caused by unpackaged user units#367megabyte0x wants to merge 7 commits into
megabyte0x wants to merge 7 commits into
Conversation
This was referenced Sep 7, 2026
Member
|
Please do not swallow enable failures for every user unit. A transient failure of sleep-lock or migrate-notify would mark first-run complete and never retry. Tolerate only the known missing-unit case, and limit migration cleanup to the known dangling link instead of deleting every dangling service symlink. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #366.
Problem
omarchy-brightness-keyboard-auto.serviceandomarchy-speaker-tuning.serviceship as source under/usr/share/omarchybut never land in/usr/lib/systemd/user/, because the omarchy-settings PKGBUILD installs user units from a hand-maintained list.install/user/first-run/enable-user-units.shenabled every unit in a singlesystemctl --user enable --nowcall underset -euo pipefail, so the one missing unit failed the whole step,first-run-userwas never marked done, and the entire first-run notification stack replayed at every login.Changes
build-packages.sh: newinstall_all_user_units()patches the omarchy-settings PKGBUILD at build time (same non-forking rewrite mechanism asstrip_limine_dependencies/keep_apple_silicon_mkinitcpio_drop_ins) with a glob loop that installs everydefault/systemd/user/*.service. It fails loudly if upstream restructures the install anchor.install/user/first-run/enable-user-units.sh: enables units one at a time, warns per failing unit, and no longer fails the first-run step. A faileddaemon-reloadstill fails, so a dead user manager retries next login.migrations/1788782695.sh: repairs wedged machines — removes the danglinggraphical-session.target.wantssymlink migration1788139121left behind and re-runs the enable. Idempotent; stays pending without a live user manager.enable-user-units-test.sh,first-run-units-migration-test.sh,user-units-packaging-test.sh(regression: every referenced omarchy user unit must ship, and the build must glob-install them), plus new assertions ininstall-mac-test.shand a pinned migration lookup inbrightness-keyboard-auto-test.sh.Verification
./test/all— only pre-existing failures remain (config-test.sh/unowned-system-paths-test.shneed an omarchy-pkgs checkout;runtime-smoke-test.shfails identically onquattroat 291a698)bin/omarchy commands --check— passed (458 commands)bash -n/ast.parseoverbin/omarchy-*— cleandefault/systemd/user/omarchy-brightness-keyboard-auto.servicemakesuser-units-packaging-test.shfail, proving it would have caught the 4.0.2 bugPlan:
plans/first-run-loop-missing-units-fix.md