Merge omacom/omarchy-iso#241: region from the timezone in one ISO
Drop our --region build, prepare-region.sh, region skel, the preselected China timezone, the explicit region in the configurator's JSON, Rime bundling and its pin.
This commit is contained in:
commit
75d00a2036
14 files changed
+409
-618
No files matched your search
@@ -91,13 +91,6 @@ OMARCHY_ZH+=(
|
||||
["Everything will be overwritten. There is no recovery possible."]="磁盘上的一切都会被覆盖,无法恢复。"
|
||||
["Confirm overwriting %s"]="确认覆盖 %s"
|
||||
)
|
||||
# China preselects the bundled cn profile's timezone when geo guessing fails.
|
||||
REGION_TIMEZONE="${REGION_TIMEZONE:-/usr/share/omarchy-iso/region/timezone}"
|
||||
region_timezone() {
|
||||
if [[ $region == "cn" ]]; then
|
||||
head -n 1 "$REGION_TIMEZONE"
|
||||
fi
|
||||
}
|
||||
|
||||
# Partition creation helpers, shared with test/partition-numbering-test.sh so
|
||||
# the numbering logic can be exercised without a real disk.
|
||||
@@ -370,7 +363,7 @@ user_form() {
|
||||
|
||||
omarchy_prompt_identity || return $?
|
||||
omarchy_prompt_hostname || return $?
|
||||
omarchy_prompt_timezone "$(region_timezone)" || return $?
|
||||
omarchy_prompt_timezone || return $?
|
||||
}
|
||||
|
||||
# Returns 0 on confirmed account details, or as soon as the keyboard screen
|
||||
@@ -390,19 +383,25 @@ user_step() {
|
||||
continue
|
||||
fi
|
||||
|
||||
# The timezone selects the region (mirrors and repositories), using the
|
||||
# same lookup as the orchestrator. Global installs get no extra row.
|
||||
region=$(cd /usr/share/omarchy-iso 2>/dev/null && python -m orchestrator.region "$timezone") || region="global"
|
||||
region_row=""
|
||||
if [[ $region != "global" ]]; then
|
||||
region_row="\n$(omarchy_text Region),$region"
|
||||
fi
|
||||
|
||||
# Add manual padding since gum table -p doesn't respect padding
|
||||
local skipped region_label=Global
|
||||
local skipped
|
||||
skipped=$(omarchy_text "[Skipped]")
|
||||
[[ $region == "cn" ]] && region_label=China
|
||||
echo -e "$(omarchy_text Field),$(omarchy_text Value)
|
||||
$(omarchy_text Username),$username
|
||||
$(omarchy_text Password),$(printf "%${#password}s" | tr ' ' '*')
|
||||
$(omarchy_text "Full name"),${full_name:-$skipped}
|
||||
$(omarchy_text "Email address"),${email_address:-$skipped}
|
||||
$(omarchy_text Hostname),$hostname
|
||||
$(omarchy_text Timezone),$timezone
|
||||
$(omarchy_text Keyboard),$keyboard
|
||||
$(omarchy_text Region),$(omarchy_text "$region_label")" |
|
||||
$(omarchy_text Timezone),$timezone$region_row
|
||||
$(omarchy_text Keyboard),$keyboard" |
|
||||
gum table -s "," -p | sed "s/^/${PADDING_LEFT_SPACES}/"
|
||||
|
||||
echo
|
||||
@@ -907,7 +906,6 @@ run_partition_execute() {
|
||||
"input_method": "${keyboard_input_method:-none}",
|
||||
"input_xkb_layout": "${keyboard_xkb_layout:-}",
|
||||
"mode": "protected",
|
||||
"region": "$region",
|
||||
"target_mount": "/mnt",
|
||||
"boot": {
|
||||
"esp_mount": "$esp_mount_in_target",
|
||||
@@ -1141,8 +1139,8 @@ select_installation() {
|
||||
|
||||
defer_provisioning=false
|
||||
install_target="full_disk"
|
||||
# A rerun arrives with the region chosen; otherwise the ISO's default.
|
||||
region="${OMARCHY_INSTALL_REGION:-$(<"${ISO_REGION_FILE:-/root/omarchy_region}")}"
|
||||
# A rerun arrives with the console language chosen; otherwise Global.
|
||||
region="${OMARCHY_INSTALL_REGION:-global}"
|
||||
|
||||
# Let the live VT reach its settled width before the first screen so the logo
|
||||
# isn't measured against the transient 80-column boot console.
|
||||
@@ -1256,7 +1254,6 @@ cat <<-_EOF_ >user_configuration.json
|
||||
"input_method": "${keyboard_input_method:-none}",
|
||||
"input_xkb_layout": "${keyboard_xkb_layout:-}",
|
||||
"mode": "full_disk",
|
||||
"region": "$region",
|
||||
"defer_provisioning": $defer_provisioning,
|
||||
"target_mount": "/mnt",
|
||||
"boot": {
|
||||
|
||||
Reference in new issue
Block a user