Make setup ISO-only
Remove legacy online installer entrypoints, collapse migrations for 4.0, and move setup responsibilities into target-side system, hardware, and user commands.
This commit is contained in:
+7
-44
@@ -1,44 +1,7 @@
|
||||
run_logged $OMARCHY_INSTALL/config/theme-system.sh
|
||||
run_logged $OMARCHY_INSTALL/config/increase-lockout-limit.sh
|
||||
run_logged $OMARCHY_INSTALL/config/lockscreen-pam.sh
|
||||
run_logged $OMARCHY_INSTALL/config/fix-powerprofilesctl-shebang.sh
|
||||
run_logged $OMARCHY_INSTALL/config/docker.sh
|
||||
run_logged $OMARCHY_INSTALL/config/input-group.sh
|
||||
|
||||
# Service enables centralized; run after all drop-in files are in place.
|
||||
run_logged $OMARCHY_INSTALL/config/enable-services.sh
|
||||
|
||||
run_logged $OMARCHY_INSTALL/config/hardware/network.sh
|
||||
run_logged $OMARCHY_INSTALL/config/hardware/set-wireless-regdom.sh
|
||||
run_logged $OMARCHY_INSTALL/config/hardware/fix-fkeys.sh
|
||||
run_logged $OMARCHY_INSTALL/config/hardware/fix-synaptic-touchpad.sh
|
||||
run_logged $OMARCHY_INSTALL/config/hardware/bluetooth.sh
|
||||
run_logged $OMARCHY_INSTALL/config/hardware/nvidia.sh
|
||||
run_logged $OMARCHY_INSTALL/config/hardware/vulkan.sh
|
||||
|
||||
run_logged $OMARCHY_INSTALL/config/hardware/intel/video-acceleration.sh
|
||||
run_logged $OMARCHY_INSTALL/config/hardware/intel/lpmd.sh
|
||||
run_logged $OMARCHY_INSTALL/config/hardware/intel/thermald.sh
|
||||
run_logged $OMARCHY_INSTALL/config/hardware/intel/ipu7-camera.sh
|
||||
run_logged $OMARCHY_INSTALL/config/hardware/intel/ptl-kernel.sh
|
||||
run_logged $OMARCHY_INSTALL/config/hardware/intel/fred.sh
|
||||
run_logged $OMARCHY_INSTALL/config/hardware/intel/fix-wifi7-eht.sh
|
||||
run_logged $OMARCHY_INSTALL/config/hardware/intel/sof-firmware.sh
|
||||
|
||||
run_logged $OMARCHY_INSTALL/config/hardware/asus/fix-asus-ptl-display-backlight.sh
|
||||
run_logged $OMARCHY_INSTALL/config/hardware/asus/fix-asus-ptl-b9406-display.sh
|
||||
run_logged $OMARCHY_INSTALL/config/hardware/asus/fix-asus-ptl-b9406-touchpad.sh
|
||||
run_logged $OMARCHY_INSTALL/config/hardware/asus/fix-z13-touchpad.sh
|
||||
|
||||
run_logged $OMARCHY_INSTALL/config/hardware/framework/qmk-hid.sh
|
||||
|
||||
run_logged $OMARCHY_INSTALL/config/hardware/apple/fix-spi-keyboard.sh
|
||||
run_logged $OMARCHY_INSTALL/config/hardware/apple/fix-suspend-nvme.sh
|
||||
run_logged $OMARCHY_INSTALL/config/hardware/apple/fix-t2.sh
|
||||
|
||||
run_logged $OMARCHY_INSTALL/config/hardware/lenovo/fix-yoga-pro7-bass-speakers.sh
|
||||
|
||||
run_logged $OMARCHY_INSTALL/config/hardware/fix-bcm43xx.sh
|
||||
run_logged $OMARCHY_INSTALL/config/hardware/fix-surface-keyboard.sh
|
||||
run_logged $OMARCHY_INSTALL/config/hardware/fix-yt6801-ethernet-adapter.sh
|
||||
run_logged $OMARCHY_INSTALL/config/hardware/fix-tuxedo-backlight.sh
|
||||
run_logged "$OMARCHY_INSTALL/config/theme-system.sh"
|
||||
run_logged "$OMARCHY_INSTALL/config/increase-lockout-limit.sh"
|
||||
run_logged "$OMARCHY_INSTALL/config/lockscreen-pam.sh"
|
||||
run_logged "$OMARCHY_INSTALL/config/fix-powerprofilesctl-shebang.sh"
|
||||
run_logged "$OMARCHY_INSTALL/config/docker.sh"
|
||||
run_logged "$OMARCHY_INSTALL/config/enable-services.sh"
|
||||
run_logged "$OMARCHY_INSTALL/config/firewall.sh"
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
# Enable services only. Installs are followed by reboot, so don't start/reload
|
||||
# daemons mid-install. UFW and hardware-gated services stay in their own scripts.
|
||||
systemctl enable bluetooth.service
|
||||
systemctl enable cups.service
|
||||
systemctl enable cups-browsed.service
|
||||
systemctl enable avahi-daemon.service
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
# Allow nothing in, everything out.
|
||||
ufw default deny incoming
|
||||
ufw default allow outgoing
|
||||
|
||||
# Allow ports for LocalSend.
|
||||
ufw allow 53317/udp
|
||||
ufw allow 53317/tcp
|
||||
|
||||
# Allow Docker containers to use DNS on host.
|
||||
ufw allow in proto udp from 172.16.0.0/12 to 172.17.0.1 port 53 comment 'allow-docker-dns'
|
||||
ufw allow in proto udp from 192.168.0.0/16 to 172.17.0.1 port 53 comment 'allow-docker-dns'
|
||||
|
||||
# Turn on Docker protections.
|
||||
ufw-docker install
|
||||
|
||||
# Installs are followed by reboot, so configure UFW to start on the installed
|
||||
# system instead of mutating the live install session's firewall.
|
||||
sed -i 's/^ENABLED=.*/ENABLED=yes/' /etc/ufw/ufw.conf
|
||||
systemctl enable ufw
|
||||
@@ -1,3 +0,0 @@
|
||||
mkdir -p ~/.config/systemd/user/
|
||||
cp "$OMARCHY_PATH/config/systemd/user/omarchy-sleep-lock.service" ~/.config/systemd/user/
|
||||
systemctl --user enable omarchy-sleep-lock.service
|
||||
@@ -4,6 +4,7 @@ ln -snf /usr/share/icons/Adwaita/symbolic/actions/go-previous-symbolic.svg \
|
||||
/usr/share/icons/Yaru/scalable/actions/go-previous-symbolic.svg
|
||||
ln -snf /usr/share/icons/Adwaita/symbolic/actions/go-next-symbolic.svg \
|
||||
/usr/share/icons/Yaru/scalable/actions/go-next-symbolic.svg
|
||||
gtk-update-icon-cache /usr/share/icons/Yaru &>/dev/null || true
|
||||
|
||||
# Chromium policy directory for theme
|
||||
mkdir -p /etc/chromium/policies/managed
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
# Setup user theme folder
|
||||
mkdir -p ~/.config/omarchy/themes
|
||||
|
||||
# Set initial theme. Offline ISO installs only need the user's theme files and
|
||||
# symlinks seeded; there is no running desktop/session bus in the chroot, so
|
||||
# skip shell IPC, dconf, app retint hooks, and background transition work.
|
||||
if install_mode_is offline; then
|
||||
OMARCHY_THEME_OFFLINE=1 OMARCHY_THEME_SKIP_BACKGROUND=1 omarchy-theme-set "Tokyo Night"
|
||||
else
|
||||
omarchy-theme-set "Tokyo Night"
|
||||
fi
|
||||
rm -rf ~/.config/chromium/SingletonLock # otherwise archiso will own the chromium singleton
|
||||
omarchy-theme-set-pi --activate
|
||||
|
||||
# Set specific app links for current theme
|
||||
mkdir -p ~/.config/btop/themes
|
||||
ln -snf ~/.config/omarchy/current/theme/btop.theme ~/.config/btop/themes/current.theme
|
||||
@@ -1,9 +0,0 @@
|
||||
run_logged $OMARCHY_INSTALL/config/theme-user.sh
|
||||
run_logged $OMARCHY_INSTALL/config/git.sh
|
||||
run_logged $OMARCHY_INSTALL/config/xcompose.sh
|
||||
run_logged $OMARCHY_INSTALL/config/mise-work.sh
|
||||
run_logged $OMARCHY_INSTALL/config/sleep-lock.sh
|
||||
run_logged $OMARCHY_INSTALL/config/hardware/bluetooth-user.sh
|
||||
run_logged $OMARCHY_INSTALL/config/hardware/asus/fix-audio-mixer.sh
|
||||
run_logged $OMARCHY_INSTALL/config/hardware/asus/fix-mic.sh
|
||||
run_logged $OMARCHY_INSTALL/config/hardware/framework/fix-f13-amd-audio-input.sh
|
||||
@@ -1 +0,0 @@
|
||||
sudo -n rm -f /etc/sudoers.d/99-omarchy-installer-reboot 2>/dev/null || true
|
||||
@@ -1,4 +0,0 @@
|
||||
# https://wiki.archlinux.org/title/Systemd-resolved
|
||||
echo "Symlink resolved stub-resolv to /etc/resolv.conf"
|
||||
|
||||
sudo ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf
|
||||
@@ -1,21 +0,0 @@
|
||||
# Allow nothing in, everything out
|
||||
sudo ufw default deny incoming
|
||||
sudo ufw default allow outgoing
|
||||
|
||||
# Allow ports for LocalSend
|
||||
sudo ufw allow 53317/udp
|
||||
sudo ufw allow 53317/tcp
|
||||
|
||||
# Allow Docker containers to use DNS on host
|
||||
sudo ufw allow in proto udp from 172.16.0.0/12 to 172.17.0.1 port 53 comment 'allow-docker-dns'
|
||||
sudo ufw allow in proto udp from 192.168.0.0/16 to 172.17.0.1 port 53 comment 'allow-docker-dns'
|
||||
|
||||
# Turn on the firewall
|
||||
sudo ufw --force enable
|
||||
|
||||
# Enable UFW systemd service to start on boot
|
||||
sudo systemctl enable ufw
|
||||
|
||||
# Turn on Docker protections
|
||||
sudo ufw-docker install
|
||||
sudo ufw reload
|
||||
@@ -1 +0,0 @@
|
||||
sudo gtk-update-icon-cache /usr/share/icons/Yaru
|
||||
@@ -0,0 +1,41 @@
|
||||
run_logged "$OMARCHY_INSTALL/hardware/asus-rog.sh"
|
||||
run_logged "$OMARCHY_INSTALL/hardware/framework16.sh"
|
||||
run_logged "$OMARCHY_INSTALL/hardware/dell-xps-touchpad-haptics.sh"
|
||||
run_logged "$OMARCHY_INSTALL/hardware/surface.sh"
|
||||
|
||||
run_logged "$OMARCHY_INSTALL/hardware/network.sh"
|
||||
run_logged "$OMARCHY_INSTALL/hardware/input-group.sh"
|
||||
run_logged "$OMARCHY_INSTALL/hardware/set-wireless-regdom.sh"
|
||||
run_logged "$OMARCHY_INSTALL/hardware/fix-fkeys.sh"
|
||||
run_logged "$OMARCHY_INSTALL/hardware/fix-synaptic-touchpad.sh"
|
||||
run_logged "$OMARCHY_INSTALL/hardware/bluetooth.sh"
|
||||
run_logged "$OMARCHY_INSTALL/hardware/nvidia.sh"
|
||||
run_logged "$OMARCHY_INSTALL/hardware/vulkan.sh"
|
||||
|
||||
run_logged "$OMARCHY_INSTALL/hardware/intel/video-acceleration.sh"
|
||||
run_logged "$OMARCHY_INSTALL/hardware/intel/lpmd.sh"
|
||||
run_logged "$OMARCHY_INSTALL/hardware/intel/thermald.sh"
|
||||
run_logged "$OMARCHY_INSTALL/hardware/intel/ipu7-camera.sh"
|
||||
run_logged "$OMARCHY_INSTALL/hardware/intel/ptl-kernel.sh"
|
||||
run_logged "$OMARCHY_INSTALL/hardware/intel/fred.sh"
|
||||
run_logged "$OMARCHY_INSTALL/hardware/intel/fix-wifi7-eht.sh"
|
||||
run_logged "$OMARCHY_INSTALL/hardware/intel/sof-firmware.sh"
|
||||
|
||||
run_logged "$OMARCHY_INSTALL/hardware/asus/fix-asus-ptl-display-backlight.sh"
|
||||
run_logged "$OMARCHY_INSTALL/hardware/asus/fix-asus-ptl-b9406-display.sh"
|
||||
run_logged "$OMARCHY_INSTALL/hardware/asus/fix-asus-ptl-b9406-touchpad.sh"
|
||||
run_logged "$OMARCHY_INSTALL/hardware/asus/fix-z13-touchpad.sh"
|
||||
|
||||
run_logged "$OMARCHY_INSTALL/hardware/framework/qmk-hid.sh"
|
||||
|
||||
run_logged "$OMARCHY_INSTALL/hardware/apple/fix-spi-keyboard.sh"
|
||||
run_logged "$OMARCHY_INSTALL/hardware/apple/fix-suspend-nvme.sh"
|
||||
run_logged "$OMARCHY_INSTALL/hardware/apple/fix-t2.sh"
|
||||
|
||||
run_logged "$OMARCHY_INSTALL/hardware/lenovo/fix-yoga-pro7-bass-speakers.sh"
|
||||
|
||||
run_logged "$OMARCHY_INSTALL/hardware/fix-bcm43xx.sh"
|
||||
run_logged "$OMARCHY_INSTALL/hardware/fix-surface-keyboard.sh"
|
||||
run_logged "$OMARCHY_INSTALL/hardware/fix-yt6801-ethernet-adapter.sh"
|
||||
run_logged "$OMARCHY_INSTALL/hardware/fix-tuxedo-backlight.sh"
|
||||
run_logged "$OMARCHY_INSTALL/hardware/pacman.sh"
|
||||
@@ -1,3 +1,5 @@
|
||||
systemctl enable bluetooth.service
|
||||
|
||||
# Persist last power state across reboots (default AutoEnable=true overrides it)
|
||||
if [[ -f /etc/bluetooth/main.conf ]]; then
|
||||
sed -i 's/^#\?AutoEnable=.*/AutoEnable=false/' /etc/bluetooth/main.conf
|
||||
@@ -1,7 +1,6 @@
|
||||
# Enable Flexible Return and Event Delivery on Intel Panther Lake.
|
||||
|
||||
DROP_IN="/etc/limine-entry-tool.d/intel-panther-lake-fred.conf"
|
||||
DEFAULT_LIMINE="/etc/default/limine"
|
||||
|
||||
if omarchy-hw-intel-ptl; then
|
||||
if [[ ! -f $DROP_IN ]] || ! grep -q 'fred=on' "$DROP_IN"; then
|
||||
@@ -11,8 +10,4 @@ if omarchy-hw-intel-ptl; then
|
||||
KERNEL_CMDLINE[default]+=" fred=on"
|
||||
EOF
|
||||
fi
|
||||
|
||||
if [[ -f $DEFAULT_LIMINE ]] && ! grep -q 'fred=on' "$DEFAULT_LIMINE"; then
|
||||
cat "$DROP_IN" | sudo tee -a "$DEFAULT_LIMINE" >/dev/null
|
||||
fi
|
||||
fi
|
||||
@@ -0,0 +1,12 @@
|
||||
# Hardware-specific pacman repository extensions that must survive the final
|
||||
# pacman.conf restore.
|
||||
if lspci -nn | grep -q "106b:180[12]"; then
|
||||
if ! grep -q '^\[arch-mact2\]' /etc/pacman.conf; then
|
||||
cat >> /etc/pacman.conf <<'EOF'
|
||||
|
||||
[arch-mact2]
|
||||
Server = https://github.com/NoaHimesaka1873/arch-mact2-mirror/releases/download/release
|
||||
SigLevel = Never
|
||||
EOF
|
||||
fi
|
||||
fi
|
||||
@@ -1,5 +0,0 @@
|
||||
source $OMARCHY_INSTALL/helpers/mode.sh
|
||||
source $OMARCHY_INSTALL/helpers/chroot.sh
|
||||
source $OMARCHY_INSTALL/helpers/presentation.sh
|
||||
source $OMARCHY_INSTALL/helpers/errors.sh
|
||||
source $OMARCHY_INSTALL/helpers/logging.sh
|
||||
@@ -1,179 +0,0 @@
|
||||
# Directs user to Omarchy Discord
|
||||
QR_CODE='
|
||||
█▀▀▀▀▀█ ▄ ▄ ▀▄▄▄█ █▀▀▀▀▀█
|
||||
█ ███ █ ▄▄▄▄▀▄▀▄▀ █ ███ █
|
||||
█ ▀▀▀ █ ▄█ ▄█▄▄▀ █ ▀▀▀ █
|
||||
▀▀▀▀▀▀▀ ▀▄█ █ █ █ ▀▀▀▀▀▀▀
|
||||
▀▀█▀▀▄▀▀▀▀▄█▀▀█ ▀ █ ▀ █
|
||||
█▄█ ▄▄▀▄▄ ▀ ▄ ▀█▄▄▄▄ ▀ ▀█
|
||||
▄ ▄▀█ ▀▄▀▀▀▄ ▄█▀▄█▀▄▀▄▀█▀
|
||||
█ ▄▄█▄▀▄█ ▄▄▄ ▀ ▄▀██▀ ▀█
|
||||
▀ ▀ ▀ █ ▀▄ ▀▀█▀▀▀█▄▀
|
||||
█▀▀▀▀▀█ ▀█ ▄▀▀ █ ▀ █▄▀██
|
||||
█ ███ █ █▀▄▄▀ █▀███▀█▄██▄
|
||||
█ ▀▀▀ █ ██ ▀ █▄█ ▄▄▄█▀ █
|
||||
▀▀▀▀▀▀▀ ▀ ▀ ▀▀▀ ▀ ▀▀▀▀▀▀'
|
||||
|
||||
# Track if we're already handling an error to prevent double-trapping
|
||||
ERROR_HANDLING=false
|
||||
|
||||
# Cursor is usually hidden while we install
|
||||
show_cursor() {
|
||||
printf "\033[?25h"
|
||||
}
|
||||
|
||||
# Display truncated log lines from the install log
|
||||
show_log_tail() {
|
||||
if [[ -f $OMARCHY_INSTALL_LOG_FILE ]]; then
|
||||
local log_lines=$((TERM_HEIGHT - LOGO_HEIGHT - 35))
|
||||
local max_line_width=$((LOGO_WIDTH - 4))
|
||||
|
||||
tail -n $log_lines "$OMARCHY_INSTALL_LOG_FILE" | while IFS= read -r line; do
|
||||
if ((${#line} > max_line_width)); then
|
||||
local truncated_line="${line:0:$max_line_width}..."
|
||||
else
|
||||
local truncated_line="$line"
|
||||
fi
|
||||
|
||||
gum style "$truncated_line"
|
||||
done
|
||||
|
||||
echo
|
||||
fi
|
||||
}
|
||||
|
||||
# Display the failed command or script name
|
||||
show_failed_script_or_command() {
|
||||
if [[ -n ${CURRENT_SCRIPT:-} ]]; then
|
||||
gum style "Failed script: $CURRENT_SCRIPT"
|
||||
else
|
||||
# Truncate long command lines to fit the display
|
||||
local cmd="$BASH_COMMAND"
|
||||
local max_cmd_width=$((LOGO_WIDTH - 4))
|
||||
|
||||
if ((${#cmd} > max_cmd_width)); then
|
||||
cmd="${cmd:0:$max_cmd_width}..."
|
||||
fi
|
||||
|
||||
gum style "$cmd"
|
||||
fi
|
||||
}
|
||||
|
||||
# Save original stdout and stderr for trap to use
|
||||
save_original_outputs() {
|
||||
exec 3>&1 4>&2
|
||||
}
|
||||
|
||||
# Restore stdout and stderr to original (saved in FD 3 and 4)
|
||||
# This ensures output goes to screen, not log file
|
||||
restore_outputs() {
|
||||
if [[ -e /proc/self/fd/3 ]] && [[ -e /proc/self/fd/4 ]]; then
|
||||
exec 1>&3 2>&4
|
||||
fi
|
||||
}
|
||||
|
||||
# Error handler
|
||||
catch_errors() {
|
||||
# Store exit code before any conditionals or assignments overwrite $?. EXIT
|
||||
# trap callers pass their already-preserved code because calling this function
|
||||
# would otherwise reset $? before we can read it.
|
||||
local exit_code="${1:-$?}"
|
||||
|
||||
# Prevent recursive error handling
|
||||
if [[ $ERROR_HANDLING == "true" ]]; then
|
||||
return
|
||||
else
|
||||
ERROR_HANDLING=true
|
||||
fi
|
||||
|
||||
stop_log_output
|
||||
|
||||
if [[ -n ${OMARCHY_CHROOT_FINALIZER:-} ]]; then
|
||||
{
|
||||
echo "Omarchy installation stopped inside offline finalizer."
|
||||
echo "This command halted with exit code $exit_code:"
|
||||
if [[ -n ${CURRENT_SCRIPT:-} ]]; then
|
||||
echo "Failed script: $CURRENT_SCRIPT"
|
||||
else
|
||||
echo "$BASH_COMMAND"
|
||||
fi
|
||||
echo "The live ISO orchestrator will show the visible error screen."
|
||||
} >&2
|
||||
exit "$exit_code"
|
||||
fi
|
||||
|
||||
restore_outputs
|
||||
|
||||
clear_logo
|
||||
show_cursor
|
||||
|
||||
gum style --foreground 1 --padding "1 0 1 $PADDING_LEFT" "Omarchy installation stopped!"
|
||||
show_log_tail
|
||||
|
||||
gum style "This command halted with exit code $exit_code:"
|
||||
show_failed_script_or_command
|
||||
|
||||
gum style "$QR_CODE"
|
||||
echo
|
||||
gum style "Get help from the community via QR code or at https://discord.gg/tXFUdasqhY"
|
||||
|
||||
# Offer options menu
|
||||
while true; do
|
||||
options=()
|
||||
|
||||
if install_mode_is online; then
|
||||
options+=("Retry installation")
|
||||
fi
|
||||
|
||||
# Add upload option if internet is available
|
||||
if ping -c 1 -W 1 1.1.1.1 >/dev/null 2>&1; then
|
||||
options+=("Upload log for support")
|
||||
fi
|
||||
|
||||
# Add remaining options
|
||||
options+=("View full log")
|
||||
options+=("Exit")
|
||||
|
||||
choice=$(gum choose "${options[@]}" --header "What would you like to do?" --height 6 --padding "1 $PADDING_LEFT")
|
||||
|
||||
case "$choice" in
|
||||
"Retry installation")
|
||||
OMARCHY_INSTALL_MODE="$OMARCHY_INSTALL_MODE" bash "$OMARCHY_PATH/install.sh"
|
||||
break
|
||||
;;
|
||||
"View full log")
|
||||
if command -v less &>/dev/null; then
|
||||
less "$OMARCHY_INSTALL_LOG_FILE"
|
||||
else
|
||||
tail "$OMARCHY_INSTALL_LOG_FILE"
|
||||
fi
|
||||
;;
|
||||
"Upload log for support")
|
||||
omarchy-upload-log
|
||||
;;
|
||||
"Exit" | "")
|
||||
exit "$exit_code"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
# Exit handler - ensures cleanup happens on any exit
|
||||
exit_handler() {
|
||||
local exit_code=$?
|
||||
|
||||
# Only run if we're exiting with an error and haven't already handled it
|
||||
if (( exit_code != 0 )) && [[ $ERROR_HANDLING != "true" ]]; then
|
||||
catch_errors "$exit_code"
|
||||
else
|
||||
stop_log_output
|
||||
[[ -n ${OMARCHY_CHROOT_FINALIZER:-} ]] || show_cursor
|
||||
fi
|
||||
}
|
||||
|
||||
# Set up traps
|
||||
trap catch_errors ERR INT TERM
|
||||
trap exit_handler EXIT
|
||||
|
||||
# Save original outputs in case we trap
|
||||
save_original_outputs
|
||||
+20
-120
@@ -1,139 +1,41 @@
|
||||
start_log_output() {
|
||||
# Offline ISO installs already have a live dashboard on tty1. The chrooted
|
||||
# finalizer's stdout/stderr is captured to logs, so this monitor would only
|
||||
# create noisy feedback in the log and burn CPU.
|
||||
[[ -n ${OMARCHY_CHROOT_FINALIZER:-} ]] && return 0
|
||||
|
||||
local ANSI_SAVE_CURSOR="\033[s"
|
||||
local ANSI_RESTORE_CURSOR="\033[u"
|
||||
local ANSI_CLEAR_LINE="\033[2K"
|
||||
local ANSI_HIDE_CURSOR="\033[?25l"
|
||||
local ANSI_RESET="\033[0m"
|
||||
local ANSI_GRAY="\033[90m"
|
||||
|
||||
# Save cursor position and hide cursor
|
||||
printf $ANSI_SAVE_CURSOR
|
||||
printf $ANSI_HIDE_CURSOR
|
||||
|
||||
(
|
||||
local log_lines=20
|
||||
local max_line_width=$((LOGO_WIDTH - 4))
|
||||
|
||||
while true; do
|
||||
# Read the last N lines into an array
|
||||
mapfile -t current_lines < <(tail -n $log_lines "$OMARCHY_INSTALL_LOG_FILE" 2>/dev/null)
|
||||
|
||||
# Build complete output buffer with escape sequences
|
||||
output=""
|
||||
for ((i = 0; i < log_lines; i++)); do
|
||||
line="${current_lines[i]:-}"
|
||||
|
||||
# Truncate if needed
|
||||
if (( ${#line} > max_line_width )); then
|
||||
line="${line:0:$max_line_width}..."
|
||||
fi
|
||||
|
||||
# Add clear line escape and formatted output for each line
|
||||
if [[ -n $line ]]; then
|
||||
output+="${ANSI_CLEAR_LINE}${ANSI_GRAY}${PADDING_LEFT_SPACES} → ${line}${ANSI_RESET}\n"
|
||||
else
|
||||
output+="${ANSI_CLEAR_LINE}${PADDING_LEFT_SPACES}\n"
|
||||
fi
|
||||
done
|
||||
|
||||
printf "${ANSI_RESTORE_CURSOR}%b" "$output"
|
||||
|
||||
sleep 0.1
|
||||
done
|
||||
) &
|
||||
monitor_pid=$!
|
||||
}
|
||||
|
||||
stop_log_output() {
|
||||
if [[ -n ${monitor_pid:-} ]]; then
|
||||
kill $monitor_pid 2>/dev/null || true
|
||||
wait $monitor_pid 2>/dev/null || true
|
||||
unset monitor_pid
|
||||
fi
|
||||
}
|
||||
|
||||
start_install_log() {
|
||||
sudo touch "$OMARCHY_INSTALL_LOG_FILE"
|
||||
sudo chmod 666 "$OMARCHY_INSTALL_LOG_FILE"
|
||||
mkdir -p "$(dirname "$OMARCHY_INSTALL_LOG_FILE")"
|
||||
touch "$OMARCHY_INSTALL_LOG_FILE"
|
||||
chmod 666 "$OMARCHY_INSTALL_LOG_FILE" 2>/dev/null || true
|
||||
|
||||
export OMARCHY_START_TIME=$(date '+%Y-%m-%d %H:%M:%S')
|
||||
export OMARCHY_START_EPOCH=$(date +%s)
|
||||
export OMARCHY_START_TIME="${OMARCHY_START_TIME:-$(date '+%Y-%m-%d %H:%M:%S')}"
|
||||
export OMARCHY_START_EPOCH="${OMARCHY_START_EPOCH:-$(date +%s)}"
|
||||
|
||||
echo "=== Omarchy Installation Started: $OMARCHY_START_TIME ===" >>"$OMARCHY_INSTALL_LOG_FILE"
|
||||
start_log_output
|
||||
echo "=== Omarchy Setup Started: $OMARCHY_START_TIME ===" >>"$OMARCHY_INSTALL_LOG_FILE"
|
||||
}
|
||||
|
||||
stop_install_log() {
|
||||
stop_log_output
|
||||
[[ -n ${OMARCHY_CHROOT_FINALIZER:-} ]] || show_cursor
|
||||
[[ -n ${OMARCHY_INSTALL_LOG_FILE:-} ]] || return 0
|
||||
|
||||
if [[ -n ${OMARCHY_INSTALL_LOG_FILE:-} ]]; then
|
||||
OMARCHY_END_TIME=$(date '+%Y-%m-%d %H:%M:%S')
|
||||
OMARCHY_END_EPOCH=$(date +%s)
|
||||
echo "=== Omarchy Installation Completed: $OMARCHY_END_TIME ===" >>"$OMARCHY_INSTALL_LOG_FILE"
|
||||
echo "" >>"$OMARCHY_INSTALL_LOG_FILE"
|
||||
echo "=== Installation Time Summary ===" >>"$OMARCHY_INSTALL_LOG_FILE"
|
||||
local end_time end_epoch duration mins secs
|
||||
end_time=$(date '+%Y-%m-%d %H:%M:%S')
|
||||
end_epoch=$(date +%s)
|
||||
|
||||
if [[ -f "/var/log/archinstall/install.log" ]]; then
|
||||
ARCHINSTALL_START=$(grep -m1 '^\[' /var/log/archinstall/install.log 2>/dev/null | sed 's/^\[\([^]]*\)\].*/\1/' || true)
|
||||
ARCHINSTALL_END=$(grep 'Installation completed without any errors' /var/log/archinstall/install.log 2>/dev/null | sed 's/^\[\([^]]*\)\].*/\1/' || true)
|
||||
echo "=== Omarchy Setup Completed: $end_time ===" >>"$OMARCHY_INSTALL_LOG_FILE"
|
||||
|
||||
if [[ -n $ARCHINSTALL_START ]] && [[ -n $ARCHINSTALL_END ]]; then
|
||||
ARCH_START_EPOCH=$(date -d "$ARCHINSTALL_START" +%s)
|
||||
ARCH_END_EPOCH=$(date -d "$ARCHINSTALL_END" +%s)
|
||||
ARCH_DURATION=$((ARCH_END_EPOCH - ARCH_START_EPOCH))
|
||||
|
||||
ARCH_MINS=$((ARCH_DURATION / 60))
|
||||
ARCH_SECS=$((ARCH_DURATION % 60))
|
||||
|
||||
echo "Archinstall: ${ARCH_MINS}m ${ARCH_SECS}s" >>"$OMARCHY_INSTALL_LOG_FILE"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -z ${OMARCHY_START_TIME:-} ]] && [[ -f "$OMARCHY_INSTALL_LOG_FILE" ]]; then
|
||||
OMARCHY_START_TIME=$(grep -m1 '^=== Omarchy Installation Started:' "$OMARCHY_INSTALL_LOG_FILE" 2>/dev/null |
|
||||
sed 's/^=== Omarchy Installation Started: \(.*\) ===$/\1/' || true)
|
||||
fi
|
||||
|
||||
if [[ -z ${OMARCHY_START_EPOCH:-} && -n ${OMARCHY_START_TIME:-} ]]; then
|
||||
OMARCHY_START_EPOCH=$(date -d "$OMARCHY_START_TIME" +%s)
|
||||
fi
|
||||
|
||||
if [[ -n ${OMARCHY_START_EPOCH:-} ]]; then
|
||||
OMARCHY_DURATION=$((OMARCHY_END_EPOCH - OMARCHY_START_EPOCH))
|
||||
|
||||
OMARCHY_MINS=$((OMARCHY_DURATION / 60))
|
||||
OMARCHY_SECS=$((OMARCHY_DURATION % 60))
|
||||
|
||||
echo "Omarchy: ${OMARCHY_MINS}m ${OMARCHY_SECS}s" >>"$OMARCHY_INSTALL_LOG_FILE"
|
||||
|
||||
if [[ -n ${ARCH_DURATION:-} ]]; then
|
||||
TOTAL_DURATION=$((ARCH_DURATION + OMARCHY_DURATION))
|
||||
TOTAL_MINS=$((TOTAL_DURATION / 60))
|
||||
TOTAL_SECS=$((TOTAL_DURATION % 60))
|
||||
echo "Total: ${TOTAL_MINS}m ${TOTAL_SECS}s" >>"$OMARCHY_INSTALL_LOG_FILE"
|
||||
fi
|
||||
fi
|
||||
echo "=================================" >>"$OMARCHY_INSTALL_LOG_FILE"
|
||||
|
||||
echo "Rebooting system..." >>"$OMARCHY_INSTALL_LOG_FILE"
|
||||
if [[ -n ${OMARCHY_START_EPOCH:-} ]]; then
|
||||
duration=$((end_epoch - OMARCHY_START_EPOCH))
|
||||
mins=$((duration / 60))
|
||||
secs=$((duration % 60))
|
||||
echo "Omarchy setup: ${mins}m ${secs}s" >>"$OMARCHY_INSTALL_LOG_FILE"
|
||||
fi
|
||||
}
|
||||
|
||||
run_logged() {
|
||||
local script="$1"
|
||||
|
||||
export CURRENT_SCRIPT="$script"
|
||||
if [[ -z ${OMARCHY_INSTALL_LOG_FILE:-} ]]; then
|
||||
bash -eE -c 'source "$1"' bash "$script"
|
||||
return
|
||||
fi
|
||||
|
||||
echo "[$(date '+%Y-%m-%d %H:%M:%S')] Starting: $script" >>"$OMARCHY_INSTALL_LOG_FILE"
|
||||
|
||||
# Use a clean subshell, but keep errexit so failures inside sourced scripts
|
||||
# cannot be hidden by a later successful command in the same script.
|
||||
if [[ ${OMARCHY_INSTALL_DEBUG:-} == "1" ]]; then
|
||||
PS4='+ ${BASH_SOURCE[0]##*/}:${LINENO}:${FUNCNAME[0]:-main}: ' \
|
||||
bash -x -eE -c 'source "$1"' bash "$script" </dev/null >>"$OMARCHY_INSTALL_LOG_FILE" 2>&1
|
||||
@@ -142,10 +44,8 @@ run_logged() {
|
||||
fi
|
||||
|
||||
local exit_code=$?
|
||||
|
||||
if (( exit_code == 0 )); then
|
||||
echo "[$(date '+%Y-%m-%d %H:%M:%S')] Completed: $script" >>"$OMARCHY_INSTALL_LOG_FILE"
|
||||
unset CURRENT_SCRIPT
|
||||
else
|
||||
echo "[$(date '+%Y-%m-%d %H:%M:%S')] Failed: $script (exit code: $exit_code)" >>"$OMARCHY_INSTALL_LOG_FILE"
|
||||
fi
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
# OMARCHY_INSTALL_MODE is one of: online, offline
|
||||
# online - bootstrap installed omarchy-* packages from the omacom-pkgs.org
|
||||
# repo on an existing Arch system, then ran install.sh.
|
||||
# offline - ISO build: archinstall pacstrapped the bundled mirror; install.sh
|
||||
# runs in the chroot before the user's first boot.
|
||||
# Legacy OMARCHY_CHROOT_INSTALL and OMARCHY_ONLINE_INSTALL still work as
|
||||
# shims during transition.
|
||||
|
||||
detect_install_mode() {
|
||||
if [[ -n ${OMARCHY_INSTALL_MODE:-} ]]; then
|
||||
case $OMARCHY_INSTALL_MODE in
|
||||
online|offline) ;;
|
||||
*)
|
||||
echo "Error: invalid OMARCHY_INSTALL_MODE=$OMARCHY_INSTALL_MODE" >&2
|
||||
echo " must be one of: online, offline" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
export OMARCHY_INSTALL_MODE
|
||||
return
|
||||
fi
|
||||
|
||||
if [[ -n ${OMARCHY_CHROOT_INSTALL:-} ]]; then
|
||||
export OMARCHY_INSTALL_MODE=offline
|
||||
elif [[ -n ${OMARCHY_ONLINE_INSTALL:-} ]]; then
|
||||
export OMARCHY_INSTALL_MODE=online
|
||||
else
|
||||
export OMARCHY_INSTALL_MODE=online
|
||||
fi
|
||||
}
|
||||
|
||||
install_mode_is() {
|
||||
[[ ${OMARCHY_INSTALL_MODE:-} == "$1" ]]
|
||||
}
|
||||
|
||||
# Synchronize the legacy vars to the canonical mode so callers that still
|
||||
# check OMARCHY_CHROOT_INSTALL / OMARCHY_ONLINE_INSTALL agree with us.
|
||||
export_legacy_mode_flags() {
|
||||
case ${OMARCHY_INSTALL_MODE:-} in
|
||||
offline)
|
||||
export OMARCHY_CHROOT_INSTALL=1
|
||||
unset OMARCHY_ONLINE_INSTALL
|
||||
;;
|
||||
online)
|
||||
export OMARCHY_ONLINE_INSTALL=true
|
||||
unset OMARCHY_CHROOT_INSTALL
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
export -f install_mode_is
|
||||
@@ -1,48 +0,0 @@
|
||||
# Ensure we have gum available
|
||||
if ! command -v gum &>/dev/null; then
|
||||
omarchy-pkg-add gum
|
||||
fi
|
||||
|
||||
# Get terminal size from /dev/tty (works in all scenarios: direct, sourced, or piped)
|
||||
if [[ -e /dev/tty ]]; then
|
||||
TERM_SIZE=$(stty size 2>/dev/null </dev/tty || true)
|
||||
|
||||
if [[ -n $TERM_SIZE ]]; then
|
||||
export TERM_HEIGHT=$(echo "$TERM_SIZE" | cut -d' ' -f1)
|
||||
export TERM_WIDTH=$(echo "$TERM_SIZE" | cut -d' ' -f2)
|
||||
else
|
||||
# Fallback to reasonable defaults if stty fails
|
||||
export TERM_WIDTH=80
|
||||
export TERM_HEIGHT=24
|
||||
fi
|
||||
else
|
||||
# No terminal available (e.g., non-interactive environment)
|
||||
export TERM_WIDTH=80
|
||||
export TERM_HEIGHT=24
|
||||
fi
|
||||
|
||||
export LOGO_PATH="$OMARCHY_PATH/logo.txt"
|
||||
export LOGO_WIDTH=$(awk '{ if (length > max) max = length } END { print max+0 }' "$LOGO_PATH" 2>/dev/null || echo 0)
|
||||
export LOGO_HEIGHT=$(wc -l <"$LOGO_PATH" 2>/dev/null || echo 0)
|
||||
|
||||
export PADDING_LEFT=$(((TERM_WIDTH - LOGO_WIDTH) / 2))
|
||||
export PADDING_LEFT_SPACES=$(printf "%*s" $PADDING_LEFT "")
|
||||
|
||||
# Tokyo Night theme for gum confirm
|
||||
export GUM_CONFIRM_PROMPT_FOREGROUND="6" # Cyan for prompt
|
||||
export GUM_CONFIRM_SELECTED_FOREGROUND="0" # Black text on selected
|
||||
export GUM_CONFIRM_SELECTED_BACKGROUND="2" # Green background for selected
|
||||
export GUM_CONFIRM_UNSELECTED_FOREGROUND="7" # White for unselected
|
||||
export GUM_CONFIRM_UNSELECTED_BACKGROUND="0" # Black background for unselected
|
||||
export PADDING="0 0 0 $PADDING_LEFT" # Gum Style
|
||||
export GUM_CHOOSE_PADDING="$PADDING"
|
||||
export GUM_FILTER_PADDING="$PADDING"
|
||||
export GUM_INPUT_PADDING="$PADDING"
|
||||
export GUM_SPIN_PADDING="$PADDING"
|
||||
export GUM_TABLE_PADDING="$PADDING"
|
||||
export GUM_CONFIRM_PADDING="$PADDING"
|
||||
|
||||
clear_logo() {
|
||||
printf "\033[H\033[2J" # Clear screen and move cursor to top-left
|
||||
gum style --foreground 2 --padding "1 0 0 $PADDING_LEFT" "$(<"$LOGO_PATH")"
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
source $OMARCHY_INSTALL/login/system.sh
|
||||
@@ -1,4 +0,0 @@
|
||||
# Run before limine-snapper.sh so the resume hook + cmdline drop-ins are in
|
||||
# place before limine-snapper performs the final Limine UKI build. The
|
||||
# --no-rebuild flag tells hibernation setup to only write config here.
|
||||
omarchy-hibernation-setup --force --no-rebuild
|
||||
@@ -1,172 +0,0 @@
|
||||
configure_snapper_root() {
|
||||
if install_mode_is offline; then
|
||||
# ISO installs configure Snapper in the orchestrator/archinstall phase with
|
||||
# `snapper --no-dbus`, before this finalizer runs. snapperd/DBus are not
|
||||
# available inside arch-chroot, so do not call plain `snapper` here.
|
||||
if [[ ! -f /etc/snapper/configs/root ]]; then
|
||||
echo "Error: offline install reached finalizer without /etc/snapper/configs/root" >&2
|
||||
exit 1
|
||||
fi
|
||||
return
|
||||
fi
|
||||
|
||||
if ! sudo snapper list-configs 2>/dev/null | grep -q "root"; then
|
||||
sudo snapper -c root create-config /
|
||||
fi
|
||||
sudo cp "$OMARCHY_PATH/default/snapper/root" /etc/snapper/configs/root
|
||||
}
|
||||
|
||||
if command -v limine &>/dev/null; then
|
||||
sudo tee /etc/mkinitcpio.conf.d/omarchy_hooks.conf <<EOF >/dev/null
|
||||
HOOKS=(base udev plymouth keyboard autodetect microcode modconf kms keymap consolefont block encrypt filesystems fsck btrfs-overlayfs)
|
||||
EOF
|
||||
sudo tee /etc/mkinitcpio.conf.d/thunderbolt_module.conf <<EOF >/dev/null
|
||||
MODULES+=(thunderbolt)
|
||||
EOF
|
||||
|
||||
# Detect boot mode
|
||||
[[ -d /sys/firmware/efi ]] && EFI=true
|
||||
|
||||
# If /etc/default/limine is already populated with a real cmdline (the ISO
|
||||
# orchestrator pre-writes it from the live install config), skip the
|
||||
# find+harvest+template-copy dance — we already have what we need. The
|
||||
# harvest path stays as a fallback for online reinstalls and any flow where
|
||||
# /etc/default/limine wasn't pre-populated.
|
||||
if [[ -f /etc/default/limine ]] && ! grep -q "@@CMDLINE@@" /etc/default/limine; then
|
||||
CMDLINE=$(grep '^KERNEL_CMDLINE\[default\]+=' /etc/default/limine | head -1 |
|
||||
sed 's|^KERNEL_CMDLINE\[default\]+="||; s|"$||')
|
||||
|
||||
if [[ -z ${CMDLINE// } ]]; then
|
||||
echo "Error: /etc/default/limine has no KERNEL_CMDLINE[default]+= line" >&2
|
||||
exit 1
|
||||
fi
|
||||
if [[ $CMDLINE != *root=* ]]; then
|
||||
echo "Error: cmdline parsed from /etc/default/limine has no root=: $CMDLINE" >&2
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
# Find config location written by archinstall (legacy harvest path)
|
||||
if [[ -f /boot/EFI/arch-limine/limine.conf ]]; then
|
||||
limine_config="/boot/EFI/arch-limine/limine.conf"
|
||||
elif [[ -f /boot/EFI/BOOT/limine.conf ]]; then
|
||||
limine_config="/boot/EFI/BOOT/limine.conf"
|
||||
elif [[ -f /boot/EFI/limine/limine.conf ]]; then
|
||||
limine_config="/boot/EFI/limine/limine.conf"
|
||||
elif [[ -f /boot/limine/limine.conf ]]; then
|
||||
limine_config="/boot/limine/limine.conf"
|
||||
elif [[ -f /boot/limine.conf ]]; then
|
||||
limine_config="/boot/limine.conf"
|
||||
else
|
||||
echo "Error: Limine config not found" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
CMDLINE=$(grep "^[[:space:]]*cmdline:" "$limine_config" | head -1 | sed 's/^[[:space:]]*cmdline:[[:space:]]*//')
|
||||
|
||||
if [[ -z ${CMDLINE// } ]]; then
|
||||
echo "Error: failed to extract kernel cmdline from $limine_config" >&2
|
||||
exit 1
|
||||
fi
|
||||
if [[ $CMDLINE != *root=* ]]; then
|
||||
echo "Error: extracted kernel cmdline has no root=: $CMDLINE" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
sudo cp $OMARCHY_PATH/default/limine/default.conf /etc/default/limine
|
||||
sudo sed -i "s|@@CMDLINE@@|$CMDLINE|g" /etc/default/limine
|
||||
fi
|
||||
|
||||
# Append any drop-in kernel cmdline configs (from hardware fix scripts, etc.)
|
||||
for dropin in /etc/limine-entry-tool.d/*.conf; do
|
||||
[ -f "$dropin" ] && cat "$dropin" | sudo tee -a /etc/default/limine >/dev/null
|
||||
done
|
||||
|
||||
# UKI and EFI fallback are EFI only
|
||||
if [[ -z $EFI ]]; then
|
||||
sudo sed -i '/^ENABLE_UKI=/d; /^ENABLE_LIMINE_FALLBACK=/d' /etc/default/limine
|
||||
fi
|
||||
|
||||
# Remove every alternate Limine config so limine-update can't pick a stale one
|
||||
# over our /boot/limine.conf.
|
||||
for stale in \
|
||||
/boot/EFI/arch-limine/limine.conf \
|
||||
/boot/EFI/BOOT/limine.conf \
|
||||
/boot/EFI/limine/limine.conf \
|
||||
/boot/limine/limine.conf; do
|
||||
[[ -f $stale ]] && sudo rm -f "$stale"
|
||||
done
|
||||
|
||||
limine_esp_path=/boot
|
||||
if [[ -f /etc/default/limine ]]; then
|
||||
# shellcheck disable=SC1091
|
||||
source /etc/default/limine
|
||||
limine_esp_path="${ESP_PATH:-/boot}"
|
||||
fi
|
||||
sudo cp "$OMARCHY_PATH/default/limine/limine.conf" "$limine_esp_path/limine.conf"
|
||||
|
||||
# limine-mkinitcpio-hook fired its post-transaction UKI build when archinstall
|
||||
# pacstrapped it (via omarchy-limine's depends) BEFORE /etc/default/limine and
|
||||
# /etc/kernel/cmdline existed, so the UKI on disk was built with an empty
|
||||
# cmdline. Delete every stale UKI for installed kernels so limine-update only
|
||||
# finds our about-to-be-rebuilt one.
|
||||
if [[ -d "$limine_esp_path/EFI/Linux" ]]; then
|
||||
while IFS= read -r kname; do
|
||||
[[ -n $kname ]] || continue
|
||||
sudo rm -f "$limine_esp_path/EFI/Linux/"*"_${kname}.efi" \
|
||||
"$limine_esp_path/EFI/Linux/"*"_${kname}-fallback.efi"
|
||||
done < <(cat /usr/lib/modules/*/pkgbase 2>/dev/null)
|
||||
fi
|
||||
|
||||
# limine-update runs limine-install + limine-mkinitcpio (which reads
|
||||
# /etc/default/limine's KERNEL_CMDLINE[default] via limine-entry-tool and
|
||||
# embeds it into a freshly-built UKI). mkinitcpio -P alone does NOT trigger
|
||||
# limine's UKI pipeline — only this command does.
|
||||
sudo limine-update
|
||||
|
||||
# Only snapshot root — /home is user data; rolling it back loses user work.
|
||||
configure_snapper_root
|
||||
|
||||
# Disable btrfs quotas — full qgroup accounting is a major performance drag
|
||||
sudo btrfs quota disable / 2>/dev/null || true
|
||||
|
||||
chrootable_systemctl_enable limine-snapper-sync.service
|
||||
LIMINE_CONFIGURED=true
|
||||
fi
|
||||
|
||||
# Restore legacy hook moves from older offline installer paths. Current ISO
|
||||
# installs mask/unmask hooks in the orchestrator, so these files usually do not
|
||||
# exist; stay quiet unless there is real cleanup to do.
|
||||
if [[ -f /usr/share/libalpm/hooks/90-mkinitcpio-install.hook.disabled || -f /usr/share/libalpm/hooks/60-mkinitcpio-remove.hook.disabled ]]; then
|
||||
echo "Re-enabling mkinitcpio hooks..."
|
||||
|
||||
if [[ -f /usr/share/libalpm/hooks/90-mkinitcpio-install.hook.disabled ]]; then
|
||||
sudo mv /usr/share/libalpm/hooks/90-mkinitcpio-install.hook.disabled /usr/share/libalpm/hooks/90-mkinitcpio-install.hook
|
||||
fi
|
||||
|
||||
if [[ -f /usr/share/libalpm/hooks/60-mkinitcpio-remove.hook.disabled ]]; then
|
||||
sudo mv /usr/share/libalpm/hooks/60-mkinitcpio-remove.hook.disabled /usr/share/libalpm/hooks/60-mkinitcpio-remove.hook
|
||||
fi
|
||||
|
||||
echo "mkinitcpio hooks re-enabled"
|
||||
fi
|
||||
|
||||
# Final sanity check: assert the Limine config and UKI actually contain what
|
||||
# they need to boot. Run AFTER snapper setup and hook re-enable so a
|
||||
# validation failure doesn't leave the system half-configured.
|
||||
if [[ ${LIMINE_CONFIGURED:-} == true ]]; then
|
||||
if ! grep -q "^/+Omarchy" /boot/limine.conf; then
|
||||
echo "Error: /boot/limine.conf does not contain an Omarchy entry" >&2
|
||||
exit 1
|
||||
fi
|
||||
if [[ ${CMDLINE:-} == *cryptdevice=* ]] && ! grep -q "cryptdevice=" /boot/limine.conf; then
|
||||
echo "Error: encrypted install but /boot/limine.conf has no cryptdevice=" >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -n $EFI ]] && efibootmgr &>/dev/null; then
|
||||
# Remove the archinstall-created Limine entry
|
||||
while IFS= read -r bootnum; do
|
||||
sudo efibootmgr -b "$bootnum" -B >/dev/null 2>&1
|
||||
done < <(efibootmgr | grep -E "^Boot[0-9]{4}\*? Arch Linux Limine" | sed 's/^Boot\([0-9]\{4\}\).*/\1/')
|
||||
fi
|
||||
+2
-18
@@ -1,22 +1,6 @@
|
||||
# Static SDDM theme/session files and wayland config are package-owned. This
|
||||
# script keeps only install-specific autologin and legacy cleanup.
|
||||
rm -f /usr/share/sddm/hyprland.conf
|
||||
|
||||
mkdir -p /etc/sddm.conf.d
|
||||
autologin_conf=/etc/sddm.conf.d/autologin.conf
|
||||
if [[ ! -f $autologin_conf ]]; then
|
||||
cat > "$autologin_conf" <<EOF
|
||||
[Autologin]
|
||||
User=$OMARCHY_INSTALL_USER
|
||||
Session=omarchy
|
||||
EOF
|
||||
else
|
||||
sed -i 's/^Session=hyprland-uwsm$/Session=omarchy/' "$autologin_conf"
|
||||
sed -i '/^\[Theme\]$/,/^$/d' "$autologin_conf"
|
||||
fi
|
||||
|
||||
# Prevent password-based SDDM logins from creating an encrypted login keyring
|
||||
# (which conflicts with the passwordless Default_keyring used for auto-unlock)
|
||||
# that conflicts with Omarchy's passwordless default keyring behavior. The ISO
|
||||
# owns autologin/session state because it knows whether the target is encrypted.
|
||||
if [[ -f /etc/pam.d/sddm ]]; then
|
||||
sed -i '/-auth.*pam_gnome_keyring\.so/d' /etc/pam.d/sddm
|
||||
sed -i '/-password.*pam_gnome_keyring\.so/d' /etc/pam.d/sddm
|
||||
|
||||
@@ -1,5 +1 @@
|
||||
run_logged $OMARCHY_INSTALL/login/sddm.sh
|
||||
if install_mode_is online; then
|
||||
run_logged $OMARCHY_INSTALL/login/hibernation.sh
|
||||
fi
|
||||
run_logged $OMARCHY_INSTALL/login/limine-snapper.sh
|
||||
run_logged "$OMARCHY_INSTALL/login/sddm.sh"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# Omarchy core package list installed via install/packaging/base.sh
|
||||
# This file is also used by the ISO builder when determining needs
|
||||
# Omarchy core package list pacstrapped by the ISO.
|
||||
# The ISO builder also reads this file when constructing the offline mirror.
|
||||
|
||||
aether
|
||||
alsa-utils
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
source $OMARCHY_INSTALL/packaging/system.sh
|
||||
source $OMARCHY_INSTALL/packaging/user.sh
|
||||
@@ -1,3 +0,0 @@
|
||||
# Install all base packages
|
||||
mapfile -t packages < <(grep -v '^#' "$OMARCHY_INSTALL/omarchy-base.packages" | grep -v '^$')
|
||||
omarchy-pkg-add "${packages[@]}"
|
||||
@@ -1,4 +0,0 @@
|
||||
# Copy all bundled icons to the applications/icons directory
|
||||
ICON_DIR="$HOME/.local/share/applications/icons"
|
||||
mkdir -p "$ICON_DIR"
|
||||
cp "$OMARCHY_PATH"/applications/icons/*.png "$ICON_DIR/"
|
||||
@@ -1,2 +0,0 @@
|
||||
# Includes lazyvim and the themes
|
||||
omarchy-nvim-setup
|
||||
@@ -1,4 +0,0 @@
|
||||
run_logged $OMARCHY_INSTALL/packaging/asus-rog.sh
|
||||
run_logged $OMARCHY_INSTALL/packaging/framework16.sh
|
||||
run_logged $OMARCHY_INSTALL/packaging/dell-xps-touchpad-haptics.sh
|
||||
run_logged $OMARCHY_INSTALL/packaging/surface.sh
|
||||
@@ -1,4 +0,0 @@
|
||||
ICON_DIR="$HOME/.local/share/applications/icons"
|
||||
|
||||
omarchy-tui-install "Disk Usage" "bash -c 'dust -r; read -n 1 -s'" float "$ICON_DIR/Disk Usage.png"
|
||||
omarchy-tui-install "Docker" "lazydocker" tile "$ICON_DIR/Docker.png"
|
||||
@@ -1 +0,0 @@
|
||||
run_logged $OMARCHY_INSTALL/packaging/nvim.sh
|
||||
@@ -1,15 +0,0 @@
|
||||
omarchy-webapp-install "HEY" https://app.hey.com HEY.png "omarchy-webapp-handler-hey %u" "x-scheme-handler/mailto"
|
||||
omarchy-webapp-install "Basecamp" https://launchpad.37signals.com Basecamp.png
|
||||
omarchy-webapp-install "WhatsApp" https://web.whatsapp.com/ WhatsApp.png
|
||||
omarchy-webapp-install "Google Photos" https://photos.google.com/ "Google Photos.png"
|
||||
omarchy-webapp-install "Google Contacts" https://contacts.google.com/ "Google Contacts.png"
|
||||
omarchy-webapp-install "Google Messages" https://messages.google.com/web/conversations "Google Messages.png"
|
||||
omarchy-webapp-install "Google Maps" https://maps.google.com "Google Maps.png"
|
||||
omarchy-webapp-install "ChatGPT" https://chatgpt.com/ ChatGPT.png
|
||||
omarchy-webapp-install "YouTube" https://youtube.com/ YouTube.png
|
||||
omarchy-webapp-install "GitHub" https://github.com/ GitHub.png
|
||||
omarchy-webapp-install "X" https://x.com/ X.png
|
||||
omarchy-webapp-install "Figma" https://figma.com/ Figma.png
|
||||
omarchy-webapp-install "Discord" https://discord.com/channels/@me Discord.png
|
||||
omarchy-webapp-install "Zoom" https://app.zoom.us/wc/home Zoom.png "omarchy-webapp-handler-zoom %u" "x-scheme-handler/zoommtg;x-scheme-handler/zoomus"
|
||||
omarchy-webapp-install "Fizzy" https://app.fizzy.do/ Fizzy.png
|
||||
@@ -1,2 +0,0 @@
|
||||
source $OMARCHY_INSTALL/post-install/system.sh
|
||||
source $OMARCHY_INSTALL/post-install/finished.sh
|
||||
@@ -1,11 +0,0 @@
|
||||
# Allow passwordless reboot for the online installer - removed in first-run
|
||||
install_user="${OMARCHY_INSTALL_USER:-${USER:-}}"
|
||||
[[ -n $install_user ]] || exit 0
|
||||
|
||||
mkdir -p /etc/sudoers.d
|
||||
cat > /etc/sudoers.d/99-omarchy-installer-reboot <<EOF
|
||||
Cmnd_Alias INSTALLER_REBOOT_CLEANUP = /usr/bin/rm -f /etc/sudoers.d/99-omarchy-installer-reboot, /bin/rm -f /etc/sudoers.d/99-omarchy-installer-reboot
|
||||
$install_user ALL=(ALL) NOPASSWD: /usr/bin/reboot
|
||||
$install_user ALL=(ALL) NOPASSWD: INSTALLER_REBOOT_CLEANUP
|
||||
EOF
|
||||
chmod 440 /etc/sudoers.d/99-omarchy-installer-reboot
|
||||
@@ -0,0 +1,5 @@
|
||||
# https://wiki.archlinux.org/title/Systemd-resolved
|
||||
# The target does not need the stub file to exist yet; systemd-resolved creates
|
||||
# it at boot.
|
||||
echo "Symlinking resolved stub-resolv to /etc/resolv.conf"
|
||||
ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf
|
||||
@@ -1,44 +0,0 @@
|
||||
stop_install_log
|
||||
|
||||
# Offline ISO installs run inside arch-chroot while the live ISO orchestrator
|
||||
# owns the visible UI. Never prompt from here: stdout/stderr may be captured to
|
||||
# logs, leaving gum waiting invisibly on /dev/tty. The live orchestrator shows
|
||||
# the final "installed in ... / reboot" screen after validation.
|
||||
if install_mode_is offline; then
|
||||
# Never risk an interactive sudo prompt in the chrooted ISO route. The
|
||||
# orchestrator removes this shim after finalize.sh returns.
|
||||
touch /var/tmp/omarchy-install-completed
|
||||
return 0 2>/dev/null || exit 0
|
||||
fi
|
||||
|
||||
echo_in_style() {
|
||||
echo "$1" | tte --canvas-width 0 --anchor-text c --frame-rate 640 print
|
||||
}
|
||||
|
||||
clear
|
||||
echo
|
||||
tte -i $OMARCHY_PATH/logo.txt --canvas-width 0 --anchor-text c --frame-rate 920 laseretch
|
||||
echo
|
||||
|
||||
# Display installation time if available
|
||||
if [[ -f $OMARCHY_INSTALL_LOG_FILE ]] && grep -q "Total:" "$OMARCHY_INSTALL_LOG_FILE" 2>/dev/null; then
|
||||
echo
|
||||
TOTAL_TIME=$(tail -n 20 "$OMARCHY_INSTALL_LOG_FILE" | grep "^Total:" | sed 's/^Total:[[:space:]]*//')
|
||||
if [[ -n $TOTAL_TIME ]]; then
|
||||
echo_in_style "Installed in $TOTAL_TIME"
|
||||
fi
|
||||
else
|
||||
echo_in_style "Finished installing"
|
||||
fi
|
||||
|
||||
if sudo test -f /etc/sudoers.d/99-omarchy-installer; then
|
||||
sudo rm -f /etc/sudoers.d/99-omarchy-installer &>/dev/null
|
||||
fi
|
||||
|
||||
# Exit gracefully if user chooses not to reboot
|
||||
if gum confirm --padding "0 0 0 $((PADDING_LEFT + 32))" --show-help=false --default --affirmative "Reboot Now" --negative "" ""; then
|
||||
# Clear screen to hide any shutdown messages
|
||||
clear
|
||||
|
||||
sudo reboot 2>/dev/null
|
||||
fi
|
||||
@@ -1,18 +0,0 @@
|
||||
# Setup sudo-less access for the privileged first-run system one-shot. The
|
||||
# install user's ~/.local/state/omarchy/first-run.mode marker is created by
|
||||
# finalize.sh while running as that user.
|
||||
install_user="$OMARCHY_INSTALL_USER"
|
||||
install_mode_is offline || exit 0
|
||||
|
||||
mkdir -p /etc/sudoers.d
|
||||
cat > /etc/sudoers.d/first-run <<EOF
|
||||
Cmnd_Alias FIRST_RUN_CLEANUP = /usr/bin/rm -f /etc/sudoers.d/first-run, /bin/rm -f /etc/sudoers.d/first-run
|
||||
Cmnd_Alias SYMLINK_RESOLVED = /usr/bin/ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf
|
||||
$install_user ALL=(ALL) NOPASSWD: /usr/bin/systemctl
|
||||
$install_user ALL=(ALL) NOPASSWD: /usr/bin/ufw
|
||||
$install_user ALL=(ALL) NOPASSWD: /usr/bin/ufw-docker
|
||||
$install_user ALL=(ALL) NOPASSWD: /usr/bin/gtk-update-icon-cache
|
||||
$install_user ALL=(ALL) NOPASSWD: SYMLINK_RESOLVED
|
||||
$install_user ALL=(ALL) NOPASSWD: FIRST_RUN_CLEANUP
|
||||
EOF
|
||||
chmod 440 /etc/sudoers.d/first-run
|
||||
@@ -1,5 +0,0 @@
|
||||
# Remove legacy paths replaced by package-owned Omarchy defaults.
|
||||
rm -f /etc/udev/rules.d/99-power-profile.rules
|
||||
rm -f /etc/udev/rules.d/99-wifi-powersave.rules
|
||||
rm -f /etc/systemd/system.conf.d/99-omarchy-nofile.conf
|
||||
rm -f /etc/systemd/user.conf.d/99-omarchy-nofile.conf
|
||||
@@ -10,11 +10,4 @@ if [[ -f $OMARCHY_PATH/etc-overrides/cups-cups-browsed.conf && -d /etc/cups ]];
|
||||
rm -f /etc/cups/cups-browsed.conf.pacnew
|
||||
fi
|
||||
|
||||
if lspci -nn | grep -q "106b:180[12]"; then
|
||||
cat >> /etc/pacman.conf <<'EOF'
|
||||
|
||||
[arch-mact2]
|
||||
Server = https://github.com/NoaHimesaka1873/arch-mact2-mirror/releases/download/release
|
||||
SigLevel = Never
|
||||
EOF
|
||||
fi
|
||||
source "$OMARCHY_INSTALL/hardware/pacman.sh"
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
run_logged $OMARCHY_INSTALL/post-install/first-run-mode.sh
|
||||
run_logged $OMARCHY_INSTALL/post-install/pacman.sh
|
||||
run_logged $OMARCHY_INSTALL/post-install/legacy-cleanup.sh
|
||||
run_logged $OMARCHY_INSTALL/post-install/udev.sh
|
||||
run_logged $OMARCHY_INSTALL/post-install/localdb.sh
|
||||
if install_mode_is online; then
|
||||
run_logged $OMARCHY_INSTALL/post-install/allow-reboot.sh
|
||||
fi
|
||||
run_logged "$OMARCHY_INSTALL/post-install/dns-resolver.sh"
|
||||
run_logged "$OMARCHY_INSTALL/post-install/pacman.sh"
|
||||
run_logged "$OMARCHY_INSTALL/post-install/udev.sh"
|
||||
run_logged "$OMARCHY_INSTALL/post-install/localdb.sh"
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
source $OMARCHY_INSTALL/preflight/guard.sh
|
||||
source $OMARCHY_INSTALL/preflight/begin.sh
|
||||
run_logged $OMARCHY_INSTALL/preflight/show-env.sh
|
||||
run_logged $OMARCHY_INSTALL/preflight/migrations.sh
|
||||
|
||||
# Offline (ISO chroot) bootstraps a system from scratch and needs the
|
||||
# first-run-mode sudoers shim plus the temporary mkinitcpio hook freeze.
|
||||
# Online installs run on an existing system that already has its own users.
|
||||
if install_mode_is offline; then
|
||||
run_logged $OMARCHY_INSTALL/preflight/first-run-mode.sh
|
||||
run_logged $OMARCHY_INSTALL/preflight/disable-mkinitcpio.sh
|
||||
fi
|
||||
@@ -1,4 +0,0 @@
|
||||
clear_logo
|
||||
gum style --foreground 3 --padding "1 0 0 $PADDING_LEFT" "Installing..."
|
||||
echo
|
||||
start_install_log
|
||||
@@ -1,16 +0,0 @@
|
||||
# Temporarily disable mkinitcpio hooks to prevent multiple regenerations during package installation
|
||||
# This speeds up installation significantly
|
||||
|
||||
echo "Temporarily disabling mkinitcpio hooks during installation..."
|
||||
|
||||
# Move the specific mkinitcpio pacman hooks out of the way if they exist
|
||||
if [[ -f /usr/share/libalpm/hooks/90-mkinitcpio-install.hook ]]; then
|
||||
sudo mv /usr/share/libalpm/hooks/90-mkinitcpio-install.hook /usr/share/libalpm/hooks/90-mkinitcpio-install.hook.disabled
|
||||
fi
|
||||
|
||||
if [[ -f /usr/share/libalpm/hooks/60-mkinitcpio-remove.hook ]]; then
|
||||
sudo mv /usr/share/libalpm/hooks/60-mkinitcpio-remove.hook /usr/share/libalpm/hooks/60-mkinitcpio-remove.hook.disabled
|
||||
fi
|
||||
|
||||
echo "mkinitcpio hooks disabled"
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
# Set first-run mode marker so we can install stuff post-installation
|
||||
mkdir -p ~/.local/state/omarchy
|
||||
touch ~/.local/state/omarchy/first-run.mode
|
||||
|
||||
# Setup sudo-less access for first-run
|
||||
sudo tee /etc/sudoers.d/first-run >/dev/null <<EOF
|
||||
Cmnd_Alias FIRST_RUN_CLEANUP = /bin/rm -f /etc/sudoers.d/first-run, /bin/rm -f /etc/sudoers.d/99-omarchy-installer-reboot
|
||||
Cmnd_Alias SYMLINK_RESOLVED = /usr/bin/ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf
|
||||
$USER ALL=(ALL) NOPASSWD: /usr/bin/systemctl
|
||||
$USER ALL=(ALL) NOPASSWD: /usr/bin/ufw
|
||||
$USER ALL=(ALL) NOPASSWD: /usr/bin/ufw-docker
|
||||
$USER ALL=(ALL) NOPASSWD: /usr/bin/gtk-update-icon-cache
|
||||
$USER ALL=(ALL) NOPASSWD: SYMLINK_RESOLVED
|
||||
$USER ALL=(ALL) NOPASSWD: FIRST_RUN_CLEANUP
|
||||
EOF
|
||||
sudo chmod 440 /etc/sudoers.d/first-run
|
||||
@@ -1,49 +0,0 @@
|
||||
abort() {
|
||||
echo -e "\e[31mOmarchy install requires: $1\e[0m"
|
||||
echo
|
||||
if [[ -n ${OMARCHY_CHROOT_FINALIZER:-} ]]; then
|
||||
exit 1
|
||||
fi
|
||||
gum confirm "Proceed anyway on your own accord and without assistance?" || exit 1
|
||||
}
|
||||
|
||||
# Must be an Arch distro
|
||||
if [[ ! -f /etc/arch-release ]]; then
|
||||
abort "Vanilla Arch"
|
||||
fi
|
||||
|
||||
# Must not be an Arch derivative distro
|
||||
for marker in /etc/cachyos-release /etc/eos-release /etc/garuda-release /etc/manjaro-release; do
|
||||
if [[ -f $marker ]]; then
|
||||
abort "Vanilla Arch"
|
||||
fi
|
||||
done
|
||||
|
||||
# Must not be running as root
|
||||
if (( EUID == 0 )); then
|
||||
abort "Running as root (not user)"
|
||||
fi
|
||||
|
||||
# Must be x86 only to fully work
|
||||
if [[ $(uname -m) != "x86_64" ]]; then
|
||||
abort "x86_64 CPU"
|
||||
fi
|
||||
|
||||
# Must have secure boot disabled
|
||||
if bootctl status 2>/dev/null | grep -q 'Secure Boot: enabled'; then
|
||||
abort "Secure Boot disabled"
|
||||
fi
|
||||
|
||||
# Must not have Gnome or KDE already install
|
||||
if pacman -Qe gnome-shell &>/dev/null || pacman -Qe plasma-desktop &>/dev/null; then
|
||||
abort "Fresh + Vanilla Arch"
|
||||
fi
|
||||
|
||||
# Must have limine installed
|
||||
command -v limine &>/dev/null || abort "Limine bootloader"
|
||||
|
||||
# Must have btrfs root filesystem
|
||||
[[ $(findmnt -n -o FSTYPE /) = "btrfs" ]] || abort "Btrfs root filesystem"
|
||||
|
||||
# Cleared all guards
|
||||
echo "Guards: OK"
|
||||
@@ -1,6 +0,0 @@
|
||||
OMARCHY_MIGRATIONS_STATE_PATH=~/.local/state/omarchy/migrations
|
||||
mkdir -p $OMARCHY_MIGRATIONS_STATE_PATH
|
||||
|
||||
for file in $OMARCHY_PATH/migrations/*.sh; do
|
||||
touch "$OMARCHY_MIGRATIONS_STATE_PATH/$(basename "$file")"
|
||||
done
|
||||
@@ -1,6 +0,0 @@
|
||||
# Show installation environment variables
|
||||
gum log --level info "Installation Environment:"
|
||||
|
||||
env | grep -E "^(OMARCHY_INSTALL_MODE|OMARCHY_CHROOT_INSTALL|OMARCHY_ONLINE_INSTALL|OMARCHY_USER_NAME|OMARCHY_USER_EMAIL|USER|HOME|OMARCHY_REPO|OMARCHY_REF|OMARCHY_PATH)=" | sort | while IFS= read -r var; do
|
||||
gum log --level info " $var"
|
||||
done
|
||||
@@ -1,6 +0,0 @@
|
||||
# System-level install work. Keep the actual logic in the same atomic
|
||||
# packaging/config/login/post-install scripts used by the online installer.
|
||||
source $OMARCHY_INSTALL/packaging/system.sh
|
||||
source $OMARCHY_INSTALL/config/all.sh
|
||||
source $OMARCHY_INSTALL/login/system.sh
|
||||
source $OMARCHY_INSTALL/post-install/system.sh
|
||||
+13
-3
@@ -1,3 +1,13 @@
|
||||
source $OMARCHY_INSTALL/packaging/user.sh
|
||||
source $OMARCHY_INSTALL/config/user.sh
|
||||
run_logged $OMARCHY_INSTALL/login/default-keyring.sh
|
||||
run_logged "$OMARCHY_INSTALL/user/theme.sh"
|
||||
run_logged "$OMARCHY_INSTALL/user/git.sh"
|
||||
run_logged "$OMARCHY_INSTALL/user/xcompose.sh"
|
||||
run_logged "$OMARCHY_INSTALL/user/mise-work.sh"
|
||||
run_logged "$OMARCHY_INSTALL/user/sleep-lock.sh"
|
||||
|
||||
run_logged "$OMARCHY_INSTALL/user/hardware/bluetooth.sh"
|
||||
run_logged "$OMARCHY_INSTALL/user/hardware/asus/fix-audio-mixer.sh"
|
||||
run_logged "$OMARCHY_INSTALL/user/hardware/asus/fix-mic.sh"
|
||||
run_logged "$OMARCHY_INSTALL/user/hardware/framework/fix-f13-amd-audio-input.sh"
|
||||
|
||||
run_logged "$OMARCHY_INSTALL/user/default-keyring.sh"
|
||||
run_logged "$OMARCHY_INSTALL/user/mise.sh"
|
||||
|
||||
@@ -6,4 +6,8 @@ cp "$OMARCHY_PATH/default/wireplumber/wireplumber.conf.d/bluetooth-a2dp-autoconn
|
||||
# a NoInputNoOutput agent on the system bus so pair() actually completes.
|
||||
mkdir -p ~/.config/systemd/user/
|
||||
cp "$OMARCHY_PATH/config/systemd/user/bt-agent.service" ~/.config/systemd/user/
|
||||
systemctl --user enable bt-agent.service
|
||||
if declare -F omarchy_user_systemctl_enable >/dev/null; then
|
||||
omarchy_user_systemctl_enable bt-agent.service
|
||||
else
|
||||
systemctl --user enable bt-agent.service
|
||||
fi
|
||||
@@ -2,7 +2,6 @@
|
||||
mkdir -p "$HOME/Work"
|
||||
mkdir -p "$HOME/Work/tries"
|
||||
|
||||
# Add ./bin to path for all items in ~/Work
|
||||
cat >"$HOME/Work/.mise.toml" <<'EOF'
|
||||
[env]
|
||||
_.path = "{{ cwd }}/bin"
|
||||
@@ -10,17 +9,18 @@ EOF
|
||||
|
||||
mise trust ~/Work/.mise.toml
|
||||
|
||||
if install_mode_is offline; then
|
||||
if [[ ${OMARCHY_SETUP_CONTEXT:-runtime} == "iso-chroot" ]]; then
|
||||
NODE_TARBALL=$(find /opt/packages -name "node-v*-linux-x64.tar.gz" -type f 2>/dev/null | head -n1)
|
||||
if [[ -z $NODE_TARBALL ]]; then
|
||||
echo "Error: bundled Node.js tarball missing from /opt/packages" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
NODE_VERSION=$(basename "$NODE_TARBALL" | sed 's/node-v\(.*\)-linux-x64.tar.gz/\1/')
|
||||
NODE_INSTALL_DIR="$HOME/.local/share/mise/installs/node/$NODE_VERSION"
|
||||
|
||||
mkdir -p "$NODE_INSTALL_DIR"
|
||||
tar -xzf "$NODE_TARBALL" \
|
||||
--strip-components=1 \
|
||||
-C "$NODE_INSTALL_DIR"
|
||||
|
||||
tar -xzf "$NODE_TARBALL" --strip-components=1 -C "$NODE_INSTALL_DIR"
|
||||
mise use -g node@"$NODE_VERSION"
|
||||
else
|
||||
mise use -g node@latest
|
||||
@@ -0,0 +1,7 @@
|
||||
mkdir -p ~/.config/systemd/user/
|
||||
cp "$OMARCHY_PATH/config/systemd/user/omarchy-sleep-lock.service" ~/.config/systemd/user/
|
||||
if declare -F omarchy_user_systemctl_enable >/dev/null; then
|
||||
omarchy_user_systemctl_enable omarchy-sleep-lock.service
|
||||
else
|
||||
systemctl --user enable omarchy-sleep-lock.service
|
||||
fi
|
||||
@@ -0,0 +1,14 @@
|
||||
# Setup user theme folder
|
||||
mkdir -p ~/.config/omarchy/themes
|
||||
|
||||
if [[ ${OMARCHY_SETUP_CONTEXT:-runtime} == "iso-chroot" ]]; then
|
||||
OMARCHY_THEME_HEADLESS=1 omarchy-theme-set "Tokyo Night"
|
||||
else
|
||||
omarchy-theme-set "Tokyo Night"
|
||||
fi
|
||||
|
||||
rm -rf ~/.config/chromium/SingletonLock
|
||||
omarchy-theme-set-pi --activate
|
||||
|
||||
mkdir -p ~/.config/btop/themes
|
||||
ln -snf ~/.config/omarchy/current/theme/btop.theme ~/.config/btop/themes/current.theme
|
||||
Reference in New Issue
Block a user