omarchy-settings-dev: ship the full set on aarch64 for runtime-profile sources

#638 gave omarchy-settings this and -dev was never ported, so edge, the only
channel aarch64 machines are qualified for, still stripped zram, oomd, zswap,
the sysctl tuning and USB autosuspend there: on Snapdragon, migration
1790328426 installs zram-generator, finds no dev-zram0.swap and completes
without zram. A source with default/settings-runtime-profile now gets the same
files, backup and optdepends on aarch64 as on x86_64, Thunderbolt drop-in
included, and its HOOKS files ship as they are. Older sources, including the
current quattro pin, keep today's aarch64 package. The platform guard and its
detector check stay aarch64-only (#691, #694). The keyboard backlight unit
first-run enables ships whenever the source has it, as in omarchy-settings.

tests/settings-runtime-profile.sh now runs both recipes. pkgrel 5 so the
recipe change builds; the payload from the current pin is unchanged.
This commit is contained in:
Marcelo Alcantara committed 2026-09-28 21:28:47 +10:00
1 parent 47a3024683
commit ea7738975a
2 files changed
+61 -32

No files matched your search

+56 -27
View File
@@ -1,7 +1,7 @@
# Maintainer: Ryan Hughes <ryan@omarchy.org>
pkgname='omarchy-settings-dev'
pkgver=4.0.0.r6663.g3faafba
pkgrel=4
pkgrel=5
# Pinned by the upstream watch in .omarchy/package.json (bin/sync-upstream):
# every quattro tip becomes a commit pin here, so the package is versioned,
# checksummed and built exactly like a release, just more often. The r-number
@@ -10,11 +10,14 @@ pkgrel=4
_commit=3faafba234e530b0986196b98dc2c38951e7dd6f
pkgdesc='Omarchy user defaults, /etc/skel content, fonts, plymouth theme, and support helpers (quattro branch tip)'
# Arch-specific because the shipped /etc tree is not the same on every
# architecture: the zram and oomd drop-ins belong to the x86_64 memory stack
# and are left out of the aarch64 package (see package()). The Limine and
# mkinitcpio drop-ins ship on both: UEFI aarch64 installs (DGX Spark,
# Snapdragon X) boot with Limine and an encrypted root exactly like x86_64.
# makepkg only honours the arch-suffixed arrays below on arch-specific packages.
# architecture for older sources: their zram and oomd drop-ins belong to the
# x86_64 memory stack and are left out of the aarch64 package (see package()).
# The Limine and mkinitcpio drop-ins ship on both: UEFI aarch64 installs (DGX
# Spark, Snapdragon X) boot with Limine and an encrypted root exactly like
# x86_64. A source with default/settings-runtime-profile decides at runtime
# which platform-specific files apply, and its aarch64 package ships the same
# files as x86_64. makepkg only honours the arch-suffixed arrays below on
# arch-specific packages.
arch=('x86_64' 'aarch64')
url='https://github.com/basecamp/omarchy'
license=('MIT')
@@ -81,14 +84,16 @@ backup+=(
'etc/limine-entry-tool.d/omarchy-uki.conf'
)
# backup has no arch-suffixed form, so the x86_64-only drop-ins join it here.
# Each of these paths is removed from the aarch64 package in package().
# Each of these paths is removed from an older source's aarch64 package in
# package(), which adds them back for a runtime-profile source.
_x86_64_backup=(
'etc/mkinitcpio.conf.d/thunderbolt_module.conf'
'etc/modprobe.d/omarchy-usb-autosuspend.conf'
'etc/systemd/oomd.conf.d/10-omarchy.conf'
'etc/systemd/zram-generator.conf'
)
if [[ $CARCH == x86_64 ]]; then
backup+=(
'etc/mkinitcpio.conf.d/thunderbolt_module.conf'
'etc/modprobe.d/omarchy-usb-autosuspend.conf'
'etc/systemd/oomd.conf.d/10-omarchy.conf'
'etc/systemd/zram-generator.conf'
)
backup+=("${_x86_64_backup[@]}")
fi
optdepends=(
@@ -155,6 +160,20 @@ _omarchy_settings_hooks_after() {
package() {
cd "$srcdir/omarchy"
# A source that decides at runtime which platform-specific files apply (see
# default/settings-runtime-profile in it) ships its whole tree on aarch64,
# with the same backup and optdepends as x86_64. Older sources still leave
# the x86_64 memory stack out there.
local legacy_aarch64=0
if [[ $CARCH == aarch64 ]]; then
if [[ -f default/settings-runtime-profile ]]; then
backup+=("${_x86_64_backup[@]}")
optdepends+=("${optdepends_x86_64[@]}")
else
legacy_aarch64=1
fi
fi
# /etc/skel/.config from config/** — system-wide default user config.
# Package-owned defaults that live elsewhere in the system belong under
# default/** or etc/** instead.
@@ -197,12 +216,16 @@ package() {
install -Dm644 default/systemd/user/omarchy-tailscale-receive.service "$pkgdir/usr/lib/systemd/user/omarchy-tailscale-receive.service"
install -Dm644 default/systemd/user/omarchy-fcitx5.service "$pkgdir/usr/lib/systemd/user/omarchy-fcitx5.service"
install -Dm644 default/systemd/user/omarchy-crash-watch.service "$pkgdir/usr/lib/systemd/user/omarchy-crash-watch.service"
# First-run enables this unit, so it ships wherever the source has it.
if [[ -f default/systemd/user/omarchy-brightness-keyboard-auto.service ]]; then
install -Dm644 default/systemd/user/omarchy-brightness-keyboard-auto.service "$pkgdir/usr/lib/systemd/user/omarchy-brightness-keyboard-auto.service"
fi
# Marks app.slice (and only app.slice) as a systemd-oomd kill candidate, so
# memory pressure costs one app scope instead of the compositor session.
# Thresholds live in etc/systemd/oomd.conf.d/10-omarchy.conf. Both this and
# the zram vendor drop-in belong to the x86_64 memory stack: the aarch64
# install neither enables systemd-oomd nor configures zram swap.
if [[ $CARCH == x86_64 ]]; then
# the zram vendor drop-in belong to the x86_64 memory stack: an older
# source's aarch64 install neither enables systemd-oomd nor configures zram.
if (( ! legacy_aarch64 )); then
install -Dm644 default/systemd/user/app.slice.d/10-oomd.conf "$pkgdir/usr/lib/systemd/user/app.slice.d/10-oomd.conf"
install -Dm644 default/systemd/zram-generator.conf.d/90-omarchy.conf "$pkgdir/usr/lib/systemd/zram-generator.conf.d/90-omarchy.conf"
fi
@@ -226,22 +249,25 @@ package() {
if [[ $CARCH == aarch64 ]]; then
# Keep omarchy_hooks.conf and the Limine entry-tool config: without them a
# kernel update on an encrypted aarch64 install rebuilds an initramfs with
# no encrypt hook and the machine cannot unlock its root. Only the
# no encrypt hook and the machine cannot unlock its root. An older source's
# Thunderbolt module request is x86-specific; ARM kernels lack the module
# and mkinitcpio treats a missing explicit module as an error.
rm -f "$pkgdir/etc/mkinitcpio.conf.d/thunderbolt_module.conf"
# and mkinitcpio treats a missing explicit module as an error. A
# runtime-profile source adds it only where the kernel has the module.
(( ! legacy_aarch64 )) || rm -f "$pkgdir/etc/mkinitcpio.conf.d/thunderbolt_module.conf"
# Apple Silicon Macs install this package too. Their initramfs needs the
# asahi hook, which omarchy-mac-boot's 90-94 fragments (Aurora) or
# mkinitcpio.conf (legacy GRUB Macs) set, and an unconditional HOOKS= here
# would replace it. A source that sets HOOKS outright (v4.0.4) gets its line
# wrapped so it applies only when the hooks loaded so far lack asahi; one that
# already decides per platform (omacom/omarchy#13362) ships as it is. The
# wrapper reads configuration, not the running machine, so it also holds
# when the image is built in a chroot.
# would replace it. An older source that sets HOOKS outright (v4.0.4) gets
# its line wrapped so it applies only when the hooks loaded so far lack
# asahi; one that already decides per platform (omacom/omarchy#13362), and
# every runtime-profile source, ships as it is. The wrapper reads
# configuration, not the running machine, so it also holds when the image
# is built in a chroot.
local hooks_conf hooks_confs=()
for hooks_conf in "$pkgdir"/etc/mkinitcpio.conf.d/{00-omarchy-hooks,omarchy_hooks}.conf; do
[[ -f $hooks_conf ]] || continue
hooks_confs+=("$hooks_conf")
(( legacy_aarch64 )) || continue
sed -i 's/^\(HOOKS=([^#]*)\)[[:space:]]*$/if [[ " ${HOOKS[*]:-} " != *" asahi "* ]]; then\n \1\nfi/' "$hooks_conf"
if grep -q '^HOOKS=' "$hooks_conf"; then
echo "${hooks_conf#"$pkgdir"/}: cannot guard this HOOKS= line for Apple Silicon" >&2
@@ -258,9 +284,12 @@ package() {
echo "etc/mkinitcpio.conf.d: the aarch64 hooks must keep a Mac's asahi line and set everyone else's" >&2
return 1
fi
# Memory stack: no zram device or zswap on the aarch64 install, and
# systemd-oomd is not enabled there, so the vm.* reclaim tuning written
# for zram would be wrong for it. Keep only the network tuning.
fi
if (( legacy_aarch64 )); then
# Memory stack: no zram device or zswap on an older source's aarch64
# install, and systemd-oomd is not enabled there, so the vm.* reclaim
# tuning written for zram would be wrong for it. Keep only the network
# tuning.
rm -rf "$pkgdir/etc/systemd/oomd.conf.d"
rm -f "$pkgdir/etc/systemd/zram-generator.conf" "$pkgdir/etc/tmpfiles.d/omarchy-zswap.conf"
cat >"$pkgdir/etc/sysctl.d/99-omarchy-sysctl.conf" <<'EOF'
+5 -5
View File
@@ -1,8 +1,8 @@
#!/bin/bash
# Run the omarchy-settings recipe's package() against synthetic source trees:
# an older source keeps today's per-architecture package, and a source that
# selects its platform profile at runtime ships the same files, backup and
# optdepends on aarch64 as on x86_64.
# Run the omarchy-settings and omarchy-settings-dev recipes' package() against
# synthetic source trees: an older source keeps today's per-architecture
# package, and a source that selects its platform profile at runtime ships the
# same files, backup and optdepends on aarch64 as on x86_64.
set -euo pipefail
export LC_ALL=C
@@ -142,7 +142,7 @@ cp "$fixtures/omarchy_hooks-v4.0.4.conf" "$scratch/legacy/etc/mkinitcpio.conf.d/
make_source "$scratch/profile" default/settings-runtime-profile "$keyboard_unit"
cp "$fixtures"/omarchy-13362/*.conf "$scratch/profile/etc/mkinitcpio.conf.d/"
for recipe in omarchy-settings; do
for recipe in omarchy-settings omarchy-settings-dev; do
rm -rf "${scratch:?}"/legacy-* "${scratch:?}"/profile-*
# An older source keeps the per-architecture package it has always had.
package_as "$recipe" "$scratch/legacy" x86_64 legacy-x86_64 pinned