Three modes the installer now branches on:
iso-chroot Running inside the new system's chroot from the ISO build.
pacman is configured by archinstall; systemd isn't running,
so service enables skip --now.
online-package Running on an existing Arch where the omarchy-* packages
are already installed. Skip base.sh and the bootstrap
preflight steps; only the per-host runtime ops in
config/login/post-install need to run.
online-git boot.sh path: clone into $HOME/.local/share/omarchy and
bootstrap everything from scratch.
install.sh derives OMARCHY_PATH from its own location, so the same script
works whether it's at /usr/share/omarchy/install.sh (package mode) or
$HOME/.local/share/omarchy/install.sh (git mode). install_mode_is helper
replaces direct ${OMARCHY_CHROOT_INSTALL:-} / ${OMARCHY_ONLINE_INSTALL:-}
checks in chroot.sh, finished.sh, errors.sh, mise-work.sh, preflight/pacman.sh.
Legacy vars still work through export_legacy_mode_flags, which sets
OMARCHY_CHROOT_INSTALL=1 / OMARCHY_ONLINE_INSTALL=true based on the
canonical mode for any caller that hasn't been updated.
bin/omarchy-install-mode prints the current mode for scripts/users that
need to introspect.
Smoke-tested all four entry paths (explicit mode, both legacy shims,
auto-detection from OMARCHY_PATH); each resolves correctly and the
legacy flags are exported in matching modes.
28 lines
728 B
Bash
28 lines
728 B
Bash
# Setup default work directory (and tries)
|
|
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"
|
|
EOF
|
|
|
|
mise trust ~/Work/.mise.toml
|
|
|
|
if install_mode_is iso-chroot; then
|
|
NODE_TARBALL=$(find /opt/packages -name "node-v*-linux-x64.tar.gz" -type f 2>/dev/null | head -n1)
|
|
|
|
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
|