Skip to content

Enable first-run units one at a time, and test that units are shipped - #14796

Merged
emirb merged 2 commits into
quattrofrom
fix/user-units-not-shipped
Oct 10, 2026
Merged

emirb merged 2 commits into
quattrofrom
fix/user-units-not-shipped

Conversation

@emirb

@emirb emirb commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #10484

Problem

omarchy-thunderbolt-authorization.service is enabled as a user unit by its setup command, by migration 1790344599 and by first-run, but the settings packages shipped it only under /usr/share/omarchy/default/systemd/user/, where systemd does not look. On edge (r6856):

  • omarchy-migrate stops at 1790344599 with Failed to enable unit: Unit omarchy-thunderbolt-authorization.service does not exist, and every later migration stays pending.
  • First-run's unit step fails and enables none of its units, because systemctl enables nothing from a list when one unit is unknown. omarchy-usb-authorization.service is in the same position on a fresh install.

The units are shipped by omacom/omarchy-pkgs#922 (merged). This is the part that belongs here.

Change

  • enable-user-units.sh enables its units one at a time. A unit missing from a build costs only that unit, and the step still exits non-zero so first-run retries.
  • config-test.sh fails when a unit under default/systemd/user is not installed by the PKGBUILD and either no command copies it out of default/, or something enables it without copying it first. Naming the source is not enough: the install or cp has to come before the enable.
  • first-run-test.sh makes each unit unknown in turn and requires exactly the calls of a clean run minus that unit, one enable --now per unit, with the theme hook still installed.

Verification

  • Against omarchy-pkgs before add workspace switching keyboard shortcuts #922, config-test.sh reports the Thunderbolt unit as shipped by nothing and the USB unit as enabled without being shipped. With add workspace switching keyboard shortcuts #922 it passes.
  • The new first-run case passes on this script and fails on the current one, on one that stops at the first missing unit, on one that drops --now, and on one that enables a single unit alone and batches the rest.
  • With the unit copy removed from omarchy-audio-tuning, config-test.sh reports omarchy-speaker-tuning.service as installed by nothing.
  • On the nightly edge VM image updated to r6856 with the stock packages, the new script enables the remaining units, installs the theme hook and exits 1; the current script enables none. After installing omarchy-settings-dev built from add workspace switching keyboard shortcuts #922, omarchy-migrate runs the 5 pending migrations and both scripts exit 0. (The VM run used the first version of this script, which differs only in how it reports the failure.)

The Thunderbolt approval watcher is enabled by its setup command, a
migration and first-run, but no package put it in a user unit folder and
nothing installed it. On edge the migration failed with "Unit
omarchy-thunderbolt-authorization.service does not exist", so every later
migration stayed pending. First-run failed too, and enabled none of its
units: given a list, systemctl enables nothing when one unit is unknown.

The units are now shipped by the settings packages (omarchy-pkgs#922).
Here, first-run enables its units one at a time, so a unit missing from a
build costs only that unit, and config-test fails when a unit under
default/systemd/user is enabled without being shipped or installed first.
@emirb
emirb force-pushed the fix/user-units-not-shipped branch from 55d911d to 55fc353 Compare October 10, 2026 00:20
@greptile-apps

greptile-apps Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no blocking issue remains.

Summary

First-run now enables user units separately, so one missing unit does not stop the others.

  • First-run starts each available user service when one is missing.
  • Config checks catch user services that lack an install path.

The previous unnumbered finding is addressed. No new actionable issues were found.

Reviews (3) · Last reviewed commit: "Require the unit copy to come before the..." · Reviewed by Greptile

Comment thread test/shell.d/config-test.sh Resolved
…n to a clean run

Naming a unit's source in default/ counted as installing it, so a command
that never copied the unit, or copied it after enabling it, passed. Look
for the install or cp of that source ahead of the enable instead.

The first-run test accepted any script that tried three of the units. It
now requires one enable --now per unit and, with each unit unknown in
turn, exactly the calls of a clean run minus that unit.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

omarchy-brightness-keyboard-auto.service is never installed to /usr/lib/systemd/user/, which also leaves every other omarchy user unit disabled

1 participant