Skip to content

Apply the etc-overrides on Apple Silicon, keeping only its os-release - #1857

Merged
ryanrhughes merged 1 commit into
masterfrom
apple-silicon-etc-overrides
Oct 29, 2026
Merged

ryanrhughes merged 1 commit into
masterfrom
apple-silicon-etc-overrides

Conversation

@dhh

@dhh dhh commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

_etc_overrides_apply() returned early on Apple Silicon after linking /etc/os-release to Arch Linux ARM's. That also skipped every override below it, so Macs were left with:

  • /etc/skel/.bashrc: the stock Arch one, so new users never source default/bash/rc and get none of Omarchy's aliases, functions or env.
  • /etc/nsswitch.conf: no mdns_minimal, so .local names (printers, other hosts) don't resolve, though avahi and nss-mdns are installed and resolved's mDNS is off.
  • /etc/security/faillock.conf: PAM's default, locking out after 3 failed passwords instead of 10.
  • /etc/cups/cups-browsed.conf: no hardening once cups-browsed is installed.

None of these is part of the distribution's identity, and omarchy-mac manages none of them. This keeps only the os-release symlink Mac-specific, since Asahi's tooling (asahi-diagnose) reports the distro from it, and applies everything else on every platform. plymouthd.conf is included too; on the Mac I checked it already matched the override.

The same change is made in omarchy-settings and omarchy-settings-dev.

Testing

  • Ran the real _etc_overrides_apply() against a fake root with _apple_silicon stubbed both ways. On Apple Silicon, os-release stays the ../usr/lib/os-release symlink and nsswitch, faillock, skel bashrc and plymouth match the overrides. On other platforms, os-release is Omarchy's and the rest match too. cups-browsed wasn't covered by that run.
  • tests/passwordless-package-lifecycle.py (11/11) and tests/passwordless-package-files.sh pass. Both stub out _etc_overrides_apply, so they don't exercise this change.
  • Not built and installed with omarchy dev pkg test.

Follow-up

Existing Mac users already have the stock ~/.bashrc in their home directory, and a fixed skel won't change that. That needs a migration in the omarchy repo.

🤖 Generated with Claude Code

omarchy-settings returned early on Apple Silicon after linking
/etc/os-release to Arch Linux ARM's, which also skipped every override
below it. Macs were left with:

- the stock Arch /etc/skel/.bashrc, so new users never source
  default/bash/rc and get none of Omarchy's aliases, functions or env;
- nsswitch.conf without mdns_minimal, so .local names (printers, other
  hosts) don't resolve, though avahi and nss-mdns are installed;
- PAM's default faillock, locking out after 3 failed passwords, not 10;
- no cups-browsed.conf hardening.

None of these is part of the distribution's identity, and omarchy-mac
manages none of them. Keep only the os-release symlink Mac-specific,
since Asahi's tooling reports the distro from it, and apply the rest
everywhere.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ryanrhughes
ryanrhughes enabled auto-merge (squash) October 29, 2026 23:04
@greptile-apps

greptile-apps Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 4/5

[Medium impact] The changes reach several machine settings on Apple Silicon through both settings packages.

The PR appears safe to merge, with a non-blocking request to retain regression coverage.

Findings

  1. P2 Mac override coverage is missing ▶

Summary

Both settings packages now apply the shared overrides on Apple Silicon instead of returning early.

  • Apple Silicon keeps its Arch identity and gets the other Omarchy settings.

Acknowledged scope:

  • Resetting customized system files is intentional and documented by the changed function.
  • dhh explicitly deferred updating existing users’ shell files to a migration in the omarchy repository.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Apply overrides] --> B{Apple Silicon?}
  B -->|Yes| C[Keep distribution os-release symlink]
  B -->|No| D[Copy Omarchy os-release and set permissions]
  C --> E[Apply remaining shared overrides]
  D --> E
Loading

Reviews (1) · Last reviewed commit: "Apply the etc-overrides on Apple Silicon..." · Reviewed by Greptile

Comment on lines +98 to +107
if _apple_silicon; then
if [[ -f /usr/lib/os-release ]]; then
rm -f /etc/os-release
ln -s ../usr/lib/os-release /etc/os-release
fi
else
rm -f /etc/os-release
cp -f /usr/share/omarchy/etc-overrides/os-release /etc/os-release
chmod 0644 /etc/os-release
fi

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Mac override coverage is missing

The existing lifecycle test replaces _etc_overrides_apply() with a no-op, so it cannot catch the Mac early return coming back. Keep the fake-root check as a regression test for both settings packages. Cover both platform branches, file permissions, and cups-browsed.conf present and absent.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added in #1927: tests/settings-etc-overrides.sh runs both packages' real _etc_overrides_apply against a scratch root, on both platforms, with cups-browsed present and absent, and checks contents and modes. It fails against the pre-#1857 script.

@ryanrhughes
ryanrhughes merged commit 5084afa into master Oct 29, 2026
11 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

Publish succeeded → live

Packages: omarchy-settings (x86_64, already published, skipped); omarchy-settings (aarch64, already published, skipped); omarchy-settings-dev (x86_64, already published, skipped); omarchy-settings-dev (aarch64, already published, skipped)

Nothing to publish: already at master's version everywhere.

Some planned slots did not run because an earlier slot failed.

Commit 5084afa · run

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.

2 participants