Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions bin/omarchy-pkg-defaults
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/bash

# omarchy:summary=Print the default package set for this computer's platform, or for the named one: the base list plus its architecture's and platform's additions.
# omarchy:args=[apple-silicon|qualcomm|generic-aarch64|generic]
# omarchy:hidden=true

set -eo pipefail

platform=${1:-}
if [[ -z $platform ]]; then
platform=$(omarchy-hw-platform)
fi

case $platform in
apple-silicon) lists=(base aarch64 apple) ;;
qualcomm) lists=(base aarch64 qualcomm) ;;
generic-aarch64) lists=(base aarch64) ;;
generic) lists=(base) ;;
*)
echo "Error: unknown platform '$platform'" >&2
exit 1
;;
esac

files=()
for list in "${lists[@]}"; do
files+=("$OMARCHY_PATH/install/omarchy-$list.packages")
done

# One name per line, first occurrence kept, in list order.
sed -e 's/[[:space:]]*#.*$//' -e '/^[[:space:]]*$/d' "${files[@]}" | awk '!seen[$0]++'
16 changes: 14 additions & 2 deletions bin/omarchy-reinstall-pkgs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,18 @@ omarchy-refresh-pacman
# Downgrade any packages to the stable setup
omarchy-update-pacman -Suu --noconfirm

# Ensure all packages are installed
mapfile -t packages < <(grep -v '^#' "$OMARCHY_PATH/install/omarchy-base.packages" | grep -v '^$')
# Ensure this platform's default packages are installed. A default no
# configured repository offers yet (an aarch64 build still unpublished) is
# reported and left out rather than failing the whole transaction.
default_packages=$(omarchy-pkg-defaults)
mapfile -t defaults <<<"$default_packages"
source "$OMARCHY_PATH/bin/omarchy-pkg-available"
packages=()
for package in "${defaults[@]}"; do
if omarchy-pkg-available "$package"; then
packages+=("$package")
else
echo "Skipping $package: no configured repository offers it" >&2
fi
done
omarchy-update-pacman -Syu --noconfirm --needed "${packages[@]}"
3 changes: 0 additions & 3 deletions default/pacman/aarch64/pacman-edge.conf
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ SigLevel = Required DatabaseOptional
LocalFileSigLevel = Optional

# pacman searches repositories in the order defined here
[asahi-alarm]
Server = https://github.com/asahi-alarm/asahi-alarm/releases/download/aarch64

[core]
Include = /etc/pacman.d/mirrorlist

Expand Down
3 changes: 0 additions & 3 deletions default/pacman/aarch64/pacman-rc.conf
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ SigLevel = Required DatabaseOptional
LocalFileSigLevel = Optional

# pacman searches repositories in the order defined here
[asahi-alarm]
Server = https://github.com/asahi-alarm/asahi-alarm/releases/download/aarch64

[core]
Include = /etc/pacman.d/mirrorlist

Expand Down
3 changes: 0 additions & 3 deletions default/pacman/aarch64/pacman-stable.conf
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ SigLevel = Required DatabaseOptional
LocalFileSigLevel = Optional

# pacman searches repositories in the order defined here
[asahi-alarm]
Server = https://github.com/asahi-alarm/asahi-alarm/releases/download/aarch64

[core]
Include = /etc/pacman.d/mirrorlist

Expand Down
52 changes: 52 additions & 0 deletions default/pacman/apple-silicon/pacman-edge.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# See the pacman.conf(5) manpage for option and repository directives

[options]
Color
ILoveCandy
VerbosePkgLists
HoldPkg = pacman glibc
Architecture = auto
CheckSpace
ParallelDownloads = 5
DownloadUser = alpm

# By default, pacman accepts packages signed by keys that its local keyring
# trusts (see pacman-key and its man page), as well as unsigned packages.
SigLevel = Required DatabaseOptional
LocalFileSigLevel = Optional

# pacman searches repositories in the order defined here. Omarchy comes first on
# Apple Silicon, so its builds for the Mac (the Aurora kernel, m1n1, U-Boot and
# the Hyprland stack) win over the same names in Asahi ALARM and Arch Linux ARM.
[omarchy]
Server = https://pkgs.omarchy.org/edge/$arch

[asahi-alarm]
Server = https://github.com/asahi-alarm/asahi-alarm/releases/download/aarch64

[core]
Include = /etc/pacman.d/mirrorlist

[extra]
Include = /etc/pacman.d/mirrorlist

[alarm]
Include = /etc/pacman.d/mirrorlist

[aur]
Include = /etc/pacman.d/mirrorlist

# Repositories for debug symbol packages.
#
# These upstream debug packages will only match core/extra/multilib packages from the Omarchy edge
# channel. Also note that you may not need to enable these repositories for many debugging tools --
# debuginfod will work fine if you're on Omarchy edge.
#
# [core-debug]
# Server = https://geo.mirror.pkgbuild.com/$repo/os/$arch
#
# [extra-debug]
# Server = https://geo.mirror.pkgbuild.com/$repo/os/$arch
#
# [multilib-debug]
# Server = https://geo.mirror.pkgbuild.com/$repo/os/$arch
37 changes: 37 additions & 0 deletions default/pacman/apple-silicon/pacman-rc.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# See the pacman.conf(5) manpage for option and repository directives

[options]
Color
ILoveCandy
VerbosePkgLists
HoldPkg = pacman glibc
Architecture = auto
CheckSpace
ParallelDownloads = 5
DownloadUser = alpm

# By default, pacman accepts packages signed by keys that its local keyring
# trusts (see pacman-key and its man page), as well as unsigned packages.
SigLevel = Required DatabaseOptional
LocalFileSigLevel = Optional

# pacman searches repositories in the order defined here. Omarchy comes first on
# Apple Silicon, so its builds for the Mac (the Aurora kernel, m1n1, U-Boot and
# the Hyprland stack) win over the same names in Asahi ALARM and Arch Linux ARM.
[omarchy]
Server = https://pkgs.omarchy.org/rc/$arch

[asahi-alarm]
Server = https://github.com/asahi-alarm/asahi-alarm/releases/download/aarch64

[core]
Include = /etc/pacman.d/mirrorlist

[extra]
Include = /etc/pacman.d/mirrorlist

[alarm]
Include = /etc/pacman.d/mirrorlist

[aur]
Include = /etc/pacman.d/mirrorlist
37 changes: 37 additions & 0 deletions default/pacman/apple-silicon/pacman-stable.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# See the pacman.conf(5) manpage for option and repository directives

[options]
Color
ILoveCandy
VerbosePkgLists
HoldPkg = pacman glibc
Architecture = auto
CheckSpace
ParallelDownloads = 5
DownloadUser = alpm

# By default, pacman accepts packages signed by keys that its local keyring
# trusts (see pacman-key and its man page), as well as unsigned packages.
SigLevel = Required DatabaseOptional
LocalFileSigLevel = Optional

# pacman searches repositories in the order defined here. Omarchy comes first on
# Apple Silicon, so its builds for the Mac (the Aurora kernel, m1n1, U-Boot and
# the Hyprland stack) win over the same names in Asahi ALARM and Arch Linux ARM.
[omarchy]
Server = https://pkgs.omarchy.org/stable/$arch

[asahi-alarm]
Server = https://github.com/asahi-alarm/asahi-alarm/releases/download/aarch64

[core]
Include = /etc/pacman.d/mirrorlist

[extra]
Include = /etc/pacman.d/mirrorlist

[alarm]
Include = /etc/pacman.d/mirrorlist

[aur]
Include = /etc/pacman.d/mirrorlist
21 changes: 21 additions & 0 deletions default/settings-runtime-profile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# omarchy-settings ships the same files on every architecture when its source
# has this file: the recipe stops leaving drop-ins out of the aarch64 package.
# Each platform-specific file below takes its decision at runtime instead.
#
# etc/mkinitcpio.conf.d/00-omarchy-hooks.conf
# Sets each platform's HOOKS baseline (omarchy-hw-platform), and leaves alone
# a Mac whose own mkinitcpio.conf carries asahi or busybox encrypt.
# etc/mkinitcpio.conf.d/thunderbolt_module.conf
# thunderbolt? is optional, so a kernel without the module skips it.
# etc/limine-entry-tool.d/, default/limine/, the limine-snapper-notify mask
# Read only where Limine and limine-snapper-sync are installed. On Apple
# Silicon the boot package's /etc/default/limine outranks every key it sets.
# etc/systemd/oomd.conf.d/, usr/lib/systemd/user/app.slice.d/10-oomd.conf
# Inert unless systemd-oomd runs (install/config/enable-services.sh,
# migration 1785424256).
# usr/lib/systemd/zram-generator.conf.d/90-omarchy.conf,
# etc/sysctl.d/99-omarchy-sysctl.conf, etc/tmpfiles.d/omarchy-zswap.conf
# Swap on zram everywhere: the installer provides zram-generator on x86_64,
# install/omarchy-aarch64.packages and migration 1790328426 on aarch64.
# etc/modprobe.d/omarchy-usb-autosuspend.conf
# Applies where usbcore is a module; Apple Silicon kernels build it in.
4 changes: 4 additions & 0 deletions docs/file-layout.md
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,10 @@ The package lists the ISO pacstraps live at `install/omarchy-base.packages`
and `install/omarchy-other.packages`; the ISO builder also reads them when
constructing its offline mirror.

A platform's default package set is the base list plus its architecture's and its platform's additions: `install/omarchy-aarch64.packages` on every aarch64 platform, then `install/omarchy-apple.packages` on Apple Silicon or `install/omarchy-qualcomm.packages` on Qualcomm. `omarchy-pkg-defaults [platform]` prints the composed set (for the running machine by default, via `omarchy-hw-platform`), and `omarchy-reinstall-pkgs` installs it. The pacman repositories follow the platform the same way: `default/pacman/` on x86_64, `default/pacman/aarch64/` on other aarch64 platforms, and `default/pacman/apple-silicon/`, the only one with the Asahi repository, on Apple Silicon.

`omarchy-settings` ships the same files on every architecture. The platform-specific ones (the mkinitcpio, Limine, zram and oomd drop-ins) decide at runtime whether they apply; `default/settings-runtime-profile` lists each one and tells the package recipe the source works this way.

## Explicit resync (`omarchy-reinstall-configs`)

When an existing user wants to reset to shipped defaults:
Expand Down
11 changes: 11 additions & 0 deletions etc/mkinitcpio.conf.d/00-omarchy-hooks.conf
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,18 @@ if command -v omarchy-hw-platform >/dev/null; then
_omarchy_platform=$(omarchy-hw-platform) || return 1
fi

# A Mac whose mkinitcpio.conf carries the asahi hook, or the busybox encrypt
# hook that unlocks it through cryptdevice= (sd-encrypt cannot parse that), boots
# the initramfs its platform set up without the Apple boot package: a legacy
# install until ticket 45 moves it. Its line stays as it is. The asahi hook also
# marks such a root off a Mac, as in a chroot or a VM.
if [[ " ${HOOKS[*]:-} " == *" asahi "* ]] ||
[[ $_omarchy_platform == "apple-silicon" && " ${HOOKS[*]:-} " == *" encrypt "* ]]; then
_omarchy_platform=platform-owned
fi

case $_omarchy_platform in
platform-owned) ;;
apple-silicon)
HOOKS=(base systemd plymouth autodetect microcode modconf kms keyboard sd-vconsole block filesystems fsck)
;;
Expand Down
2 changes: 1 addition & 1 deletion etc/mkinitcpio.conf.d/thunderbolt_module.conf
Original file line number Diff line number Diff line change
@@ -1 +1 @@
MODULES+=(thunderbolt)
MODULES+=(thunderbolt?)
7 changes: 4 additions & 3 deletions install/config/enable-services.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ systemctl enable sddm.service
# whole session down. [Install] pulls in systemd-oomd.socket via Also=, which
# is what the user manager reports app.slice candidacy over.
#
# Not on Apple Silicon: that install ships neither the oomd drop-ins nor the
# zram swap they are tuned against (see the omarchy-settings package), so
# enabling the killer there would run it on its stock thresholds alone.
# Not on a fresh Apple Silicon install: turning systemd-oomd on there is a
# change of its own, even though omarchy-settings now ships its drop-ins and
# zram swap on every platform. Macs updated through migration 1785424256
# already run it.
omarchy-hw-apple-silicon ||
systemctl enable systemd-oomd.service
18 changes: 12 additions & 6 deletions install/helpers/pacman.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,20 @@ omarchy_pacman_channel_qualified() {
}

# Render into a caller-owned temporary directory. Never sync or touch /etc.
# Only Apple Silicon adds the Asahi repositories; every aarch64 platform uses
# the Arch Linux ARM mirrors.
omarchy_pacman_stage() {
local channel=$1 destination=$2 templates="$OMARCHY_PATH/default/pacman"
local channel=$1 destination=$2 platform templates="$OMARCHY_PATH/default/pacman"
local repositories mirrors
omarchy_pacman_validate_channel "$channel" || return 1
if omarchy-hw-apple-silicon; then
templates+=/aarch64
fi
cp "$templates/pacman-$channel.conf" "$destination/pacman.conf" || return 1
cp "$templates/mirrorlist-$channel" "$destination/mirrorlist" || return 1
platform=$(omarchy-hw-platform) || return 1
case $platform in
apple-silicon) repositories=$templates/apple-silicon mirrors=$templates/aarch64 ;;
qualcomm | generic-aarch64) repositories=$templates/aarch64 mirrors=$templates/aarch64 ;;
*) repositories=$templates mirrors=$templates ;;
esac
cp "$repositories/pacman-$channel.conf" "$destination/pacman.conf" || return 1
cp "$mirrors/mirrorlist-$channel" "$destination/mirrorlist" || return 1
}

# Read candidate databases in isolation before touching live configuration.
Expand Down
6 changes: 3 additions & 3 deletions install/login/grub-splash.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Limine machines get "quiet splash" from the limine-entry-tool drop-in and the
# plymouth hook from the mkinitcpio drop-in, both shipped by omarchy-settings.
# Apple Silicon boots m1n1 -> U-Boot -> GRUB, and the aarch64 omarchy-settings
# deliberately ships neither drop-in, so both have to land in the files GRUB
# and mkinitcpio read directly. The menu title comes from GRUB_DISTRIBUTOR,
# Apple Silicon boots m1n1 -> U-Boot -> GRUB, and omarchy-settings applies
# neither drop-in there, so both have to land in the files GRUB and mkinitcpio
# read directly. The menu title comes from GRUB_DISTRIBUTOR,
# which defaults to the os-release name, so those machines otherwise offer to
# boot "Arch Linux". Nothing here runs where Limine is installed or GRUB is not.
omarchy-cmd-missing limine || return 0
Expand Down
4 changes: 4 additions & 0 deletions install/omarchy-aarch64.packages
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Additions for every aarch64 platform, composed after omarchy-base.packages
# (omarchy-pkg-defaults). x86_64 gets zram-generator from its installer, and
# omarchy-settings' zram and reclaim settings expect it everywhere.
zram-generator
19 changes: 17 additions & 2 deletions install/omarchy-apple.packages
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# Apple Silicon profile additions; install before omarchy-apply-system.
# Consume alongside the shared base manifest, never on Intel/T2 or other ARM.
# Apple Silicon additions, composed after omarchy-base.packages and
# omarchy-aarch64.packages (omarchy-pkg-defaults apple-silicon); never on
# Intel/T2 or other ARM. Install them before omarchy-apply-system. The kernel
# and boot chain come with the image, as the kernel and bootloader do on x86_64.
omarchy-mac

# Audio: PipeWire's PulseAudio server and realtime scheduling, which x86_64
# gets from its installer, and the Asahi speaker stack (install/hardware/apple/audio.sh).
asahi-audio
pipewire-alsa
pipewire-pulse
rtkit
speakersafetyd

# Hardware video decode (install/hardware/apple/video-decode.sh).
avd-fw
libva-v4l2_request-avd

# Widevine for DRM streaming.
widevine
3 changes: 3 additions & 0 deletions install/omarchy-qualcomm.packages
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Qualcomm (Snapdragon) additions, composed after omarchy-base.packages and
# omarchy-aarch64.packages (omarchy-pkg-defaults qualcomm).
linux-firmware-qcom
24 changes: 24 additions & 0 deletions migrations/1790328426.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
echo "Give aarch64 machines the zram swap omarchy-settings now configures there"

# omarchy-settings used to leave its zram drop-in and reclaim tuning out on
# aarch64. It ships them on every platform now, and they expect swap on zram,
# so install the generator where this platform's default packages name it
# (x86_64 gets it from its installer) and start the device it configures.
if omarchy-pkg-defaults | grep -x zram-generator >/dev/null && omarchy-pkg-missing zram-generator; then
omarchy-pkg-add zram-generator
if ! systemctl is-active --quiet dev-zram0.swap; then
sudo systemctl daemon-reload
sudo systemctl start systemd-zram-setup@zram0.service || true
fi
fi

# Migration 1789154627 copied the drop-in into /etc on Macs under the same
# name. An identical copy would only hide the packaged one's updates; a copy
# that differs is the administrator's and stays.
vendor="${OMARCHY_ZRAM_DROPIN_USR:-/usr/lib/systemd/zram-generator.conf.d/90-omarchy.conf}"
copy="${OMARCHY_ZRAM_DROPIN_ETC:-/etc/systemd/zram-generator.conf.d/90-omarchy.conf}"

if [[ -f $vendor && -f $copy && ! -L $copy ]] && cmp -s -- "$vendor" "$copy"; then
sudo rm -f -- "$copy"
sudo rmdir --ignore-fail-on-non-empty -- "${copy%/*}"
fi
2 changes: 1 addition & 1 deletion packages/omarchy-mac/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Runtime dependencies: `omarchy` (the `omarchy-hw-platform` detector and its Appl

## Setup contract

Install the matching runtime, settings and add-on candidates in one pacman transaction. Their transferred commands and user unit must have only one owner. On Apple Silicon, include `install/omarchy-apple.packages` alongside the desktop base package list before calling `omarchy-apply-system`. The desktop checks the package is already present before its network hardware setup; offline setup never downloads it.
Install the matching runtime, settings and add-on candidates in one pacman transaction. Their transferred commands and user unit must have only one owner. On Apple Silicon, install the platform's default set (`omarchy-pkg-defaults apple-silicon`: the base, aarch64 and Apple lists) before calling `omarchy-apply-system`. The desktop checks the package is already present before its network hardware setup; offline setup never downloads it.

Run `omarchy-mac-setup-system` as root on the target hardware (inside its target chroot for offline provisioning). An optional absolute root argument supports staging against the same target hardware without a bus. It exits without changes unless `omarchy-hw-platform` reports `apple-silicon`, and fails if the detector does. It retires only exact generated Wi-Fi, module and service files, retaining a `.omarchy-mac-retired` backup; the `/etc/NetworkManager/conf.d/wifi_backend.conf` that earlier Apple installs wrote is one of them, and any edited copy stays in place and keeps precedence. It enables resume recovery only for BCM4378, BCM4387 and BCM4388 on Apple Silicon; Intel/T2 Macs are excluded. It is the only enabler of `speakersafetyd`, without which the kernel keeps the speakers muted: it applies the package's `80-omarchy-mac-audio.preset` once speakersafetyd is installed, so `/etc` presets that sort before it or replace it by name, masks and later explicit disables win, and image builders that apply presets get the same result. A live run also restarts a speakersafetyd left dead by a start-limit. No NetworkManager restart or driver reload occurs during setup. The backend applies when NetworkManager next starts; notch changes apply when appledrm next loads. The greeter drop-in needs no setup: from the next `sddm` start it holds the greeter, for at most 10 s, until Apple's display controller has replaced the boot framebuffer.

Expand Down
Loading
Loading