From af601381ca6e408d4dbf1d2d499f66c73d36a878 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Thu, 16 Jul 2026 20:46:41 -0700 Subject: [PATCH] Ensure lock is setup on migration --- bin/omarchy-upgrade-to-quattro | 14 ++++++++++++++ test/shell.d/upgrade-to-quattro-test.sh | 5 +++++ 2 files changed, 19 insertions(+) diff --git a/bin/omarchy-upgrade-to-quattro b/bin/omarchy-upgrade-to-quattro index 230f0601..ada559e9 100755 --- a/bin/omarchy-upgrade-to-quattro +++ b/bin/omarchy-upgrade-to-quattro @@ -475,6 +475,19 @@ configure_snapper_policy() { as_root env OMARCHY_PATH=/usr/share/omarchy bash -euo pipefail "$snapper_config_script" } +configure_lock_authentication() { + local setup_lock=/usr/share/omarchy/bin/omarchy-setup-lock + + [[ -x $setup_lock ]] || fail "$setup_lock is unavailable; lock screen authentication could not be configured." + + log "Configuring lock screen authentication" + as_root env \ + OMARCHY_INSTALL_USER="$target_user" \ + OMARCHY_PATH=/usr/share/omarchy \ + PATH="$package_path" \ + "$setup_lock" +} + create_pre_upgrade_snapshot() { omarchy-snapshot create || (($? == 127)) } @@ -2307,6 +2320,7 @@ remove_conflicting_legacy_packages install_omarchy_quattro_packages normalize_limine_config configure_snapper_policy +configure_lock_authentication migrate_1password_beta_package cleanup_legacy_user_paths apply_system_transition diff --git a/test/shell.d/upgrade-to-quattro-test.sh b/test/shell.d/upgrade-to-quattro-test.sh index 1ef68cc0..d4b750e7 100644 --- a/test/shell.d/upgrade-to-quattro-test.sh +++ b/test/shell.d/upgrade-to-quattro-test.sh @@ -37,6 +37,11 @@ grep -F '/usr/share/omarchy/install/config/snapper.sh' "$upgrade_to_quattro" >/d grep -F 'bash -euo pipefail "$snapper_config_script"' "$upgrade_to_quattro" >/dev/null pass "Omarchy 4 upgrade normalizes Snapper retention" +grep -F 'configure_lock_authentication' "$upgrade_to_quattro" >/dev/null +grep -F 'OMARCHY_INSTALL_USER="$target_user"' "$upgrade_to_quattro" >/dev/null +grep -F '"$setup_lock"' "$upgrade_to_quattro" >/dev/null +pass "Omarchy 4 upgrade configures lock screen authentication for the target user" + grep -F 'OMARCHY_UPGRADE_TO_QUATTRO_LIVE=1' "$upgrade_to_quattro" >/dev/null grep -F 'systemd-networkd.service' "$upgrade_to_quattro" >/dev/null grep -F 'systemd-networkd.socket' "$upgrade_to_quattro" >/dev/null