#!/usr/bin/env bash set -euo pipefail chroot_bash() { HOME=/home/$OMARCHY_USER \ arch-chroot -u $OMARCHY_USER /mnt/ \ env OMARCHY_CHROOT_INSTALL=1 \ OMARCHY_USER_NAME="$(/dev/null && umount -R /mnt # Install using files generated by the ./configurator archinstall \ --config user_configuration.json \ --creds user_credentials.json \ --silent # No need to ask for sudo during the installation (omarchy itself responsible for removing after install) mkdir -p /mnt/etc/sudoers.d cat >/mnt/etc/sudoers.d/99-omarchy-installer </dev/null || echo "https://omarchy.org/install") chroot_bash -lc "curl -fsSL $OMARCHY_INSTALL_URL | bash || bash" fi