diff --git a/etc/mkinitcpio.conf.d/thunderbolt_module.conf b/etc/mkinitcpio.conf.d/thunderbolt_module.conf index 9518f8b1201..2f145bb5534 100644 --- a/etc/mkinitcpio.conf.d/thunderbolt_module.conf +++ b/etc/mkinitcpio.conf.d/thunderbolt_module.conf @@ -1 +1,7 @@ -MODULES+=(thunderbolt) +# Thunderbolt is x86-oriented hardware and the module is not built for every +# architecture -- ALARM's aarch64 kernel has no `thunderbolt`. mkinitcpio treats +# an unresolvable MODULES entry as an error, which fails every initramfs build +# on such a system, so gate it rather than forcing it unconditionally. +if [[ $(uname -m) == x86_64 ]]; then + MODULES+=(thunderbolt) +fi diff --git a/install/post-install/pacman.sh b/install/post-install/pacman.sh index 23580b3c527..dcf39563ce6 100644 --- a/install/post-install/pacman.sh +++ b/install/post-install/pacman.sh @@ -1,7 +1,31 @@ # Configure pacman after package installation completes. Offline target package # installs use the live ISO's offline pacman.conf until this final restore. -cp -f "$OMARCHY_PATH/default/pacman/pacman-${OMARCHY_MIRROR:-stable}.conf" /etc/pacman.conf -cp -f "$OMARCHY_PATH/default/pacman/mirrorlist-${OMARCHY_MIRROR:-stable}" /etc/pacman.d/mirrorlist +case "$(uname -m)" in + aarch64) + # Omarchy's pacman.conf and mirrorlist describe an x86_64 Arch system: + # [multilib] is 32-bit x86 libraries and no ARM mirror carries it, and the + # mirrorlist points at Omarchy's mirror of Arch, which is x86_64 only. + # Arch Linux ARM also lays its tree out as $arch/$repo rather than Arch's + # $repo/os/$arch, so the mirrorlist cannot be reused with a different host. + # + # Derive the config from Omarchy's instead: drop [multilib], keep [omarchy] + # (its $arch placeholder resolves correctly), add Arch Linux ARM's own + # [alarm] and [aur] repositories, and leave the mirrorlist the distribution + # installed. Skipping this step is not an option: the live ISO's pacman.conf + # only knows the offline mirror, which does not exist on the installed system. + awk ' + /^\[multilib\]$/ { skip = 1; next } + /^\[/ { skip = 0 } + skip { next } + { print } + ' "$OMARCHY_PATH/default/pacman/pacman-${OMARCHY_MIRROR:-stable}.conf" >/etc/pacman.conf + printf '\n[alarm]\nInclude = /etc/pacman.d/mirrorlist\n\n[aur]\nInclude = /etc/pacman.d/mirrorlist\n' >>/etc/pacman.conf + ;; + *) + cp -f "$OMARCHY_PATH/default/pacman/pacman-${OMARCHY_MIRROR:-stable}.conf" /etc/pacman.conf + cp -f "$OMARCHY_PATH/default/pacman/mirrorlist-${OMARCHY_MIRROR:-stable}" /etc/pacman.d/mirrorlist + ;; +esac # omarchy-settings skips this override until cups-browsed is actually present # to avoid pacman creating cups-browsed.conf.pacnew during ISO package install. diff --git a/install/user/mise-work.sh b/install/user/mise-work.sh index f77d5561e0e..17ea1e25df9 100644 --- a/install/user/mise-work.sh +++ b/install/user/mise-work.sh @@ -19,7 +19,12 @@ case ${OMARCHY_SETUP_CONTEXT:-runtime} in esac if [[ -n $NODE_PACKAGE_DIR ]]; then - NODE_TARBALL=$(find "$NODE_PACKAGE_DIR" -name "node-v*-linux-x64.tar.gz" -type f 2>/dev/null | head -n1) + # Node names its builds x64/arm64, not by uname + case "$(uname -m)" in + aarch64) _NODE_ARCH=arm64 ;; + *) _NODE_ARCH=x64 ;; + esac + NODE_TARBALL=$(find "$NODE_PACKAGE_DIR" -name "node-v*-linux-${_NODE_ARCH}.tar.gz" -type f 2>/dev/null | head -n1) if [[ -z $NODE_TARBALL ]]; then if [[ ${OMARCHY_SETUP_CONTEXT:-} == "provision-owner" ]]; then # A factory snapshot predating the bundled tarball may not have it staged. @@ -31,7 +36,7 @@ if [[ -n $NODE_PACKAGE_DIR ]]; then exit 1 fi else - NODE_VERSION=$(basename "$NODE_TARBALL" | sed 's/node-v\(.*\)-linux-x64.tar.gz/\1/') + NODE_VERSION=$(basename "$NODE_TARBALL" | sed "s/node-v\\(.*\\)-linux-${_NODE_ARCH}.tar.gz/\\1/") NODE_INSTALL_DIR="$HOME/.local/share/mise/installs/node/$NODE_VERSION" mkdir -p "$NODE_INSTALL_DIR"