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:
+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"
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
KEYRING_DIR="$HOME/.local/share/keyrings"
|
||||
KEYRING_FILE="$KEYRING_DIR/Default_keyring.keyring"
|
||||
DEFAULT_FILE="$KEYRING_DIR/default"
|
||||
|
||||
mkdir -p "$KEYRING_DIR"
|
||||
|
||||
if [[ ! -f $KEYRING_FILE ]]; then
|
||||
cat > "$KEYRING_FILE" <<EOF
|
||||
[keyring]
|
||||
display-name=Default keyring
|
||||
ctime=$(date +%s)
|
||||
mtime=0
|
||||
lock-on-idle=false
|
||||
lock-after=false
|
||||
EOF
|
||||
fi
|
||||
|
||||
if [[ ! -f $DEFAULT_FILE ]]; then
|
||||
cat > "$DEFAULT_FILE" <<EOF
|
||||
Default_keyring
|
||||
EOF
|
||||
fi
|
||||
|
||||
chmod 700 "$KEYRING_DIR"
|
||||
chmod 600 "$KEYRING_FILE"
|
||||
chmod 644 "$DEFAULT_FILE"
|
||||
@@ -0,0 +1,3 @@
|
||||
gsettings set org.gnome.desktop.interface gtk-theme "Adwaita-dark"
|
||||
gsettings set org.gnome.desktop.interface color-scheme "prefer-dark"
|
||||
gsettings set org.gnome.desktop.interface icon-theme "Yaru-blue"
|
||||
@@ -0,0 +1 @@
|
||||
gsettings set org.gnome.desktop.interface gtk-enable-primary-paste true
|
||||
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
(
|
||||
if [[ -n $(omarchy-notification-send -u critical -g "Install Dictation with Voxtype" "Click to install voice dictation for Omarchy." -a) ]]; then
|
||||
omarchy-launch-floating-terminal-with-presentation omarchy-voxtype-install
|
||||
fi
|
||||
) >/dev/null 2>&1 &
|
||||
|
||||
# Remove this hook after scheduling the background notification action.
|
||||
rm -f "$0"
|
||||
@@ -0,0 +1,5 @@
|
||||
(
|
||||
if [[ -n $(omarchy-notification-send -u critical -g "Learn Keybindings" "Super + K for cheatsheet.\nSuper + Space for application launcher.\nSuper + Alt + Space for Omarchy Menu." -a) ]]; then
|
||||
omarchy-menu-keybindings
|
||||
fi
|
||||
) >/dev/null 2>&1 &
|
||||
@@ -0,0 +1,22 @@
|
||||
notify_update() {
|
||||
(
|
||||
if [[ -n $(omarchy-notification-send -u critical -g "Update System" "$1" -a) ]]; then
|
||||
omarchy-launch-floating-terminal-with-presentation omarchy-update
|
||||
fi
|
||||
) >/dev/null 2>&1 &
|
||||
}
|
||||
|
||||
notify_wifi() {
|
||||
(
|
||||
if [[ -n $(omarchy-notification-send -u critical -g "Click to Setup Wi-Fi" -a) ]]; then
|
||||
omarchy-shell omarchy.network toggle
|
||||
fi
|
||||
) >/dev/null 2>&1 &
|
||||
}
|
||||
|
||||
if ! ping -c3 -W1 1.1.1.1 >/dev/null 2>&1; then
|
||||
notify_update "When you have internet, click to update the system."
|
||||
notify_wifi
|
||||
else
|
||||
notify_update "Click to update the system."
|
||||
fi
|
||||
@@ -0,0 +1,8 @@
|
||||
# Set identification from install inputs
|
||||
if [[ -n ${OMARCHY_USER_NAME//[[:space:]]/} ]]; then
|
||||
git config --global user.name "$OMARCHY_USER_NAME"
|
||||
fi
|
||||
|
||||
if [[ -n ${OMARCHY_USER_EMAIL//[[:space:]]/} ]]; then
|
||||
git config --global user.email "$OMARCHY_USER_EMAIL"
|
||||
fi
|
||||
@@ -0,0 +1,13 @@
|
||||
# Fix audio volume on Asus ROG laptops by using a soft mixer.
|
||||
|
||||
if omarchy-hw-asus-rog; then
|
||||
mkdir -p ~/.config/wireplumber/wireplumber.conf.d/
|
||||
cp "$OMARCHY_PATH/default/wireplumber/wireplumber.conf.d/alsa-soft-mixer.conf" ~/.config/wireplumber/wireplumber.conf.d/
|
||||
rm -rf ~/.local/state/wireplumber/default-routes
|
||||
|
||||
# Unmute the Master control on the ALC285 card (often muted by default)
|
||||
card=$(aplay -l 2>/dev/null | grep -i "ALC285" | head -1 | sed 's/card \([0-9]*\).*/\1/')
|
||||
if [[ -n $card ]]; then
|
||||
amixer -c "$card" set Master 80% unmute 2>/dev/null
|
||||
fi
|
||||
fi
|
||||
@@ -0,0 +1,15 @@
|
||||
# Fix internal mic gain on ASUS ROG laptops with Realtek ALC285.
|
||||
# The mic boost is way too high by default, causing clipping.
|
||||
# Sets levels and stores ALSA state so it persists across reboots.
|
||||
|
||||
if omarchy-hw-asus-rog; then
|
||||
for card in /proc/asound/card*/codec*; do
|
||||
if grep -q "ALC285" "$card" 2>/dev/null; then
|
||||
cardnum=$(echo "$card" | grep -oP 'card\K\d+')
|
||||
amixer -c "$cardnum" set 'Internal Mic Boost' 0 >/dev/null 2>&1 || true
|
||||
amixer -c "$cardnum" set 'Capture' 70% unmute >/dev/null 2>&1 || true
|
||||
sudo alsactl store "$cardnum" 2>/dev/null || true
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
@@ -0,0 +1,13 @@
|
||||
mkdir -p ~/.config/wireplumber/wireplumber.conf.d/
|
||||
cp "$OMARCHY_PATH/default/wireplumber/wireplumber.conf.d/bluetooth-a2dp-autoconnect.conf" ~/.config/wireplumber/wireplumber.conf.d/
|
||||
|
||||
# Quickshell.Bluetooth has no Agent API, so the omarchy.bluetooth plugin
|
||||
# can't answer the auth prompts bluez issues during pair(). bt-agent registers
|
||||
# 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/
|
||||
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
|
||||
@@ -0,0 +1,5 @@
|
||||
AMD_AUDIO_CARD=$(pactl list cards 2>/dev/null | grep -B20 "Family 17h/19h" | grep "Name: " | awk '{print $2}' || true)
|
||||
|
||||
if [[ -n $AMD_AUDIO_CARD ]]; then
|
||||
pactl set-card-profile "$AMD_AUDIO_CARD" "HiFi (Mic1, Mic2, Speaker)" 2>/dev/null || true
|
||||
fi
|
||||
@@ -0,0 +1 @@
|
||||
systemctl --user enable omarchy-recover-internal-monitor.service
|
||||
@@ -0,0 +1,27 @@
|
||||
# Setup default work directory (and tries)
|
||||
mkdir -p "$HOME/Work"
|
||||
mkdir -p "$HOME/Work/tries"
|
||||
|
||||
cat >"$HOME/Work/.mise.toml" <<'EOF'
|
||||
[env]
|
||||
_.path = "{{ cwd }}/bin"
|
||||
EOF
|
||||
|
||||
mise trust ~/Work/.mise.toml
|
||||
|
||||
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"
|
||||
mise use -g node@"$NODE_VERSION"
|
||||
else
|
||||
mise use -g node@latest
|
||||
fi
|
||||
@@ -0,0 +1,10 @@
|
||||
omarchy-mise-install codex
|
||||
omarchy-mise-install claude
|
||||
omarchy-mise-install gemini
|
||||
omarchy-mise-install gh
|
||||
omarchy-mise-install copilot
|
||||
omarchy-mise-install opencode
|
||||
omarchy-mise-install npm:playwright playwright
|
||||
omarchy-mise-install pi
|
||||
omarchy-mise-install npm:@kitlangton/ghui ghui
|
||||
omarchy-mise-install aqua:modem-dev/hunk hunk
|
||||
@@ -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
|
||||
@@ -0,0 +1,11 @@
|
||||
# Set default XCompose that is triggered with CapsLock
|
||||
tee ~/.XCompose >/dev/null <<EOF
|
||||
# Run omarchy-restart-xcompose to apply changes
|
||||
|
||||
# Include fast emoji access
|
||||
include "/usr/share/omarchy/default/xcompose"
|
||||
|
||||
# Identification
|
||||
<Multi_key> <space> <n> : "$OMARCHY_USER_NAME"
|
||||
<Multi_key> <space> <e> : "$OMARCHY_USER_EMAIL"
|
||||
EOF
|
||||
Reference in New Issue
Block a user