Regional package and time configuration
Regional package and time configuration makes a system fit its location without changing the set of trusted repositories. It selects package mirrors from the installer's timezone, applies those mirrors during install or an explicit package refresh, sets the local timezone, and keeps system time synchronized. See Regional configuration and connectivity for the wider regional model and Captive portal and network connectivity for network access that can affect mirror use.
Regional package repository overlays
A regional overlay is a small set of mirror additions applied on top of the normal channel configuration. The base channel still defines the repositories and signing policy; the regional additions only place a location-specific server first so the normal .org server remains a fallback. The active region is recorded as plain text in /etc/omarchy/region.
The system derives a region from the selected timezone during installation or deferred first-boot setup. A timezone that matches no profile uses the global configuration. The current profile is then combined with the platform's channel templates before the package files are installed.
flowchart LR
A[Selected timezone] --> B[Region profile]
B --> C[Region marker]
C --> D[Channel package template]
D --> E[Regional Omarchy mirror first]
D --> F[Regional Arch mirror first]
E --> G[Installed pacman configuration]
F --> G
G --> H[Packages from regional mirror or fallback]
Region profiles
Each profile in default/regions/<code>/ joins a list of timezone names to per-channel package mirror additions. The profile does not add a repository or a signing key. This keeps regional delivery separate from package trust and from the user's interface language.
The current China profile maps Asia/Shanghai and compatible legacy tzdata names to China-specific mirrors. Hong Kong, Macau, and Taiwan remain global even though their timezone names are nearby or related.
References: default/…/timezones• L1-9 docs/regions.md• L19-26 docs/regions.md• L37-39
Region status
The region status command reports the region for which the machine was installed. It reads the region marker and reports global when the marker is absent, so maintenance actions have a clear default even when no regional profile applies.
References: bin/omarchy-region• L3-8
Mirror precedence
The package configuration gives the regional Omarchy server first place in the [omarchy] repository and puts the regional Arch mirror before the channel mirror list. pacman keeps the channel's original server after the regional entry, so a regional mirror failure can fall back to the standard source. The regional mirror must still provide complete and current package metadata because pacman uses the first database that answers.
References: default/…/pacman-stable.conf• L13-29 default/…/mirrorlist-stable• L1 default/…/omarchy-stable.prepend• L1 default/…/mirrorlist-stable.prepend• L1 bin/omarchy-apply-pacman• L64-83 docs/regions.md• L14-17
Timezone data
The timezone is the user's local time rule. The setup form and the desktop menu use the system's tzdata list, then apply the selected name through timedatectl; this updates the clock display and the time rules used by applications.
Timezone selection
During setup, the shared form presents the timezone after the account and hostname choices. It prefers a preset from the install media or caller, then a network-based location guess, then a caller-provided fallback; if no guess is available, it offers the full system timezone list. The setup then applies the selected timezone and uses it to settle the regional marker and related country settings. In the running desktop, the Timezone menu changes only the system timezone and refreshes the clock view.
References: install/…/setup-form.sh• L222-241 bin/omarchy-provision-owner• L717-724 bin/omarchy-provision-owner• L891-903 bin/omarchy-menu-timezone• L7-12
Region and timezone relationship
The timezone choice affects package mirrors only during region settlement. A later timezone change does not silently change package repositories; package defaults change when the region marker is updated and the package configuration is refreshed. This boundary prevents an ordinary clock preference change from also changing package sources.
References: bin/omarchy-provision-owner• L905-937 bin/omarchy-menu-timezone• L7-12 docs/regions.md• L7-17
Time synchronization
System time synchronization is separate from the local timezone. systemd-timesyncd obtains the current time from network time servers, while the timezone controls how that time is shown locally.
Time server selection
The Omarchy default supplies ntp.omarchy.org and time.cloudflare.com as fallback servers. A server named by the system configuration or provided by the network takes priority over these fallbacks. An administrator can replace the fallback list with a local systemd drop-in without changing the regional package profile.
References: default/…/10-omarchy.conf• L1-10
Synchronization restart
The time maintenance action restarts systemd-timesyncd so it can start a fresh synchronization attempt. It does not change the timezone or package mirror choice.
References: bin/omarchy-update-time• L1-7
Configuration maintenance
Package configuration and time synchronization have different maintenance paths. Package refreshes rebuild channel and regional files, while time maintenance restarts the synchronization service without touching package files.
Package configuration refreshes
Install finalization and omarchy-refresh-pacman use the same package configuration restore path. An explicit refresh selects a channel, renders both package files before replacement, backs up existing files, and then performs the package update. Ordinary package updates do not enforce regional defaults, so local package edits remain until a refresh or channel change restores the defaults.
Regional rendering is available only where the profile supplies the needed additions. The current regional additions are for x86, so other platforms retain their platform channel templates until matching regional mirrors exist.
References: install/…/pacman.sh• L1-25 bin/omarchy-refresh-pacman• L33-74 bin/omarchy-apply-pacman• L47-95 docs/regions.md• L7-13
Time configuration changes
Changing the timezone is a direct system setting change. The menu asks for the complete timezone name, applies it, refreshes the clock interface, and reports the result. Restarting synchronization is a separate action because a correct timezone does not itself correct the system clock.
References: bin/omarchy-menu-timezone• L7-12 bin/omarchy-update-time• L3-7 etc/…/omarchy-tzupdate• L1 test/…/timezone-test.sh• L7-40
Change checklist
When these files or sections are changed, remember to consider these:
- Keep every timezone in a profile valid in the installed tzdata set and keep each timezone mapped to at most one profile.
- Keep each channel's regional Omarchy fragment paired with its regional Arch mirror fragment.
- Preserve the base repository order and signing policy when adding a regional mirror; regional overlays must not create new trust roots.
- Keep platform channel templates and regional additions compatible so a refresh cannot select a profile that lacks its required mirror files.
- If the fallback time server policy changes, check that local
NTP=settings and network-provided servers still have the intended priority. - Keep the region status command's marker path and
globalfallback aligned with the file written during setup.
Important failure modes
| Trigger | Consequence | Guard |
|---|---|---|
| A timezone profile names a missing or ambiguous tzdata zone | Install region selection becomes invalid or inconsistent | Validate profile names against tzdata and enforce one profile per timezone |
| A regional channel fragment is missing | Package configuration is not rendered for that regional refresh | Require both the Omarchy and Arch mirror fragments before replacement |
| A regional mirror serves incomplete or stale metadata | pacman can choose that database and fail to resolve current packages | Keep the regional database complete and synchronized with the standard source |
| A package refresh cannot identify the platform or channel | Existing package configuration remains in place | Validate the platform templates before replacing either file |
| The region marker path differs between setup and status reporting | The machine can be configured for one region while maintenance reports global | Keep the writer and reader on the same marker path |
| Network time servers are unavailable | The clock remains unsynchronized even though the timezone is correct | Provide more than one fallback server and allow local or network server overrides |
Key files
| File | Why to read it |
|---|---|
| docs/regions.md | Defines the regional model, installer contract, mirror trust boundary, and supported profiles |
default/regions/cn/timezones | Shows how timezone names select the current regional profile |
default/regions/cn/pacman/ | Shows the per-channel regional mirror additions |
default/pacman/pacman-stable.conf | Shows the base repository order and signing policy |
bin/omarchy-apply-pacman | Defines how channel templates and regional overlays become package configuration |
bin/omarchy-refresh-pacman | Defines the explicit package refresh and replacement flow |
| install/…/setup-form.sh | Defines shared timezone selection and its preset, network guess, and fallback order |
bin/omarchy-provision-owner | Shows how first-boot timezone selection settles the region and applies the timezone |
bin/omarchy-region | Reports the installed region and the global fallback used when no marker exists |
bin/omarchy-menu-timezone | Shows how a running desktop changes its timezone |
default/systemd/timesyncd.conf.d/10-omarchy.conf | Defines the default fallback time servers |
bin/omarchy-update-time | Defines the time synchronization restart action |