diff --git a/bin/omarchy-iso-make b/bin/omarchy-iso-make index 56c65e1..fbe4360 100755 --- a/bin/omarchy-iso-make +++ b/bin/omarchy-iso-make @@ -3,11 +3,40 @@ # Abort if anything fails set -e +# Parse command line arguments +BUILD_MODE="offline" +NO_CACHE="" +while [[ $# -gt 0 ]]; do + case $1 in + --online) + BUILD_MODE="online" + shift + ;; + --offline) + BUILD_MODE="offline" + shift + ;; + --no-cache) + NO_CACHE=1 + shift + ;; + --no-boot-offer) + NO_BOOT_OFFER=1 + shift + ;; + *) + echo "Unknown option: $1" + echo "Usage: $0 [--online|--offline] [--no-cache] [--no-boot-offer]" + exit 1 + ;; + esac +done + # Ensure we have the submodule checked out git submodule update --init --recursive --jobs=8 # Prepare build repo -BUILD_SCRIPT="builder/online.sh" +BUILD_SCRIPT="builder/build-iso.sh" BUILD_ROOT=$(realpath "${BASH_SOURCE[0]%/*}/..") BUILD_RELEASE_PATH="$BUILD_ROOT/release" mkdir -p "$BUILD_RELEASE_PATH" @@ -27,10 +56,12 @@ DOCKER_ARGS=( -e "OMARCHY_INSTALLER_REPO=$OMARCHY_INSTALLER_REPO" -e "OMARCHY_INSTALLER_REF=$OMARCHY_INSTALLER_REF" -e "OMARCHY_INSTALLER_URL=$OMARCHY_INSTALLER_URL" + -e "OMARCHY_BUILD_MODE=$BUILD_MODE" -v "$BUILD_RELEASE_PATH/:/out/" -v "$BUILD_ROOT/$BUILD_SCRIPT:/$BUILD_SCRIPT:ro" -v "$BUILD_ROOT/archiso:/archiso:ro" -v "$BUILD_ROOT/builder:/builder:ro" + -v "$BUILD_ROOT/configs:/configs:ro" ) # Use local pacman cache if you already have one on host to speed up repeat runs @@ -38,19 +69,27 @@ if [ -d "/var/cache/pacman/pkg" ]; then DOCKER_ARGS+=(-v "/var/cache/pacman/pkg:/var/cache/pacman/pkg") fi +# Mount the build cache directory where packages are downloaded for the offline repo +# Only applicable for offline builds and when --no-cache is not specified +if [[ "$BUILD_MODE" == "offline" && -z "$NO_CACHE" ]]; then + # using a dated dir on the host to refresh daily if building multiple times + BUILD_DATE=$(date +%Y-%m-%d) + OFFLINE_REPO_BUILD_CACHE_DIR="$HOME/.cache/omarchy/iso_${BUILD_DATE}/airootfs/var/cache/omarchy" + mkdir -p "$OFFLINE_REPO_BUILD_CACHE_DIR" + # Mount to /var/cache/airootfs/var/cache/omarchy since that's where repo packages go in the ISO + DOCKER_ARGS+=(-v "$OFFLINE_REPO_BUILD_CACHE_DIR:/var/cache/airootfs/var/cache/omarchy") +fi + # Run the builder with assembled args docker run "${DOCKER_ARGS[@]}" archlinux/archlinux:latest /$BUILD_SCRIPT -# Make iso accessible to all -sudo chmod 777 -R "$BUILD_RELEASE_PATH" - # Move as install ref latest_iso=$(\ls -t "$BUILD_RELEASE_PATH"/*.iso | head -n1) iso_ref="${latest_iso%.*}-$OMARCHY_INSTALLER_REF.iso" -mv "$latest_iso" "$iso_ref" +mv -f "$latest_iso" "$iso_ref" # Offer to boot the new build -if [[ $1 != "--no-boot-offer" ]]; then +if [[ -z "$NO_BOOT_OFFER" ]]; then echo gum confirm "Boot $iso_ref?" && omarchy-iso-boot "$iso_ref" fi diff --git a/bin/omarchy-iso-make-offline b/bin/omarchy-iso-make-offline deleted file mode 100755 index fa2ccf7..0000000 --- a/bin/omarchy-iso-make-offline +++ /dev/null @@ -1,62 +0,0 @@ -#!/bin/bash - -# Abort if anything fails -set -e - -# Ensure we have the submodule checked out -git submodule update --init --recursive --jobs=8 - -# Prepare build repo -BUILD_SCRIPT="builder/offline.sh" -BUILD_ROOT=$(realpath "${BASH_SOURCE[0]%/*}/..") -BUILD_RELEASE_PATH="$BUILD_ROOT/release" -mkdir -p "$BUILD_RELEASE_PATH" - -OMARCHY_CONFIGURATOR_REPO="${OMARCHY_CONFIGURATOR_REPO:-omacom-io/omarchy-configurator}" -OMARCHY_CONFIGURATOR_REF="${OMARCHY_CONFIGURATOR_REF:-master}" - -OMARCHY_INSTALLER_REPO="${OMARCHY_INSTALLER_REPO:-basecamp/omarchy}" -OMARCHY_INSTALLER_REF="${OMARCHY_INSTALLER_REF:-master}" -OMARCHY_INSTALLER_URL="${OMARCHY_INSTALLER_URL:-https://omarchy.org/install}" - -DOCKER_ARGS=( - --rm - --privileged - -e "OMARCHY_CONFIGURATOR_REPO=$OMARCHY_CONFIGURATOR_REPO" - -e "OMARCHY_CONFIGURATOR_REF=$OMARCHY_CONFIGURATOR_REF" - -e "OMARCHY_INSTALLER_REPO=$OMARCHY_INSTALLER_REPO" - -e "OMARCHY_INSTALLER_REF=$OMARCHY_INSTALLER_REF" - -e "OMARCHY_INSTALLER_URL=$OMARCHY_INSTALLER_URL" - -v "$BUILD_RELEASE_PATH/:/out/" - -v "$BUILD_ROOT/$BUILD_SCRIPT:/$BUILD_SCRIPT:ro" - -v "$BUILD_ROOT/archiso:/archiso:ro" - -v "$BUILD_ROOT/builder:/builder:ro" - -v "$BUILD_ROOT/configs:/configs:ro" -) - -# Use local pacman cache if you already have one on host to speed up repeat runs -if [ -d "/var/cache/pacman/pkg" ]; then - DOCKER_ARGS+=(-v "/var/cache/pacman/pkg:/var/cache/pacman/pkg") -fi - -# Mount the build cache directory where packages are downloaded -# using a dated dir on the host to refresh daily if building multiple times -BUILD_DATE=$(date +%Y-%m-%d) -BUILD_CACHE_DIR="$HOME/.cache/omarchy/iso_${BUILD_DATE}/airootfs/var/cache/omarchy" -mkdir -p "$BUILD_CACHE_DIR" -# Mount to /var/cache/airootfs/var/cache/omarchy since that's where packages go in the ISO -DOCKER_ARGS+=(-v "$BUILD_CACHE_DIR:/var/cache/airootfs/var/cache/omarchy") - -# Run the builder with assembled args -docker run "${DOCKER_ARGS[@]}" archlinux/archlinux:latest /$BUILD_SCRIPT - -# Move as install ref -latest_iso=$(\ls -t "$BUILD_RELEASE_PATH"/*.iso | head -n1) -iso_ref="${latest_iso%.*}-$OMARCHY_INSTALLER_REF.iso" -mv -f "$latest_iso" "$iso_ref" - -# Offer to boot the new build -if [[ $1 != "--no-boot-offer" ]]; then - echo - gum confirm "Boot $iso_ref?" && omarchy-iso-boot "$iso_ref" -fi diff --git a/builder/offline.sh b/builder/build-iso.sh similarity index 68% rename from builder/offline.sh rename to builder/build-iso.sh index 795e7aa..08f6260 100755 --- a/builder/offline.sh +++ b/builder/build-iso.sh @@ -2,6 +2,9 @@ set -e +# Build mode: offline (default) or online │ │ +OMARCHY_BUILD_MODE="${OMARCHY_BUILD_MODE:-offline}" + # Note that these are packages installed to the Arch container # used to build the ISO. pacman-key --init @@ -55,7 +58,7 @@ prepare_offline_mirror() { # Download all the packages to the offline mirror inside the ISO echo "Downloading all packages (including AUR) to offline mirror: ${all_packages[@]}" - pacman --config /builder/pacman-mirror.conf \ + pacman --config /configs/pacman-online.conf \ --noconfirm -Syw "${all_packages[@]}" \ --cachedir $offline_mirror_dir/ \ --dbpath /tmp/offlinedb @@ -66,12 +69,8 @@ prepare_offline_mirror() { fi } -make_archiso_offline() { - # This function will simply disable any online activity we have. - # for instance the reflector.service which tries to optimize - # mirror order by fetching the latest mirror list by default. - - # Disable reflector +disable_reflector() { + # Avoid using reflector for mirror identification as we are relying on the global CDN rm "$build_cache_dir/airootfs/etc/systemd/system/multi-user.target.wants/reflector.service" rm -rf "$build_cache_dir/airootfs/etc/systemd/system/reflector.service.d" rm -rf "$build_cache_dir/airootfs/etc/xdg/reflector" @@ -86,8 +85,9 @@ mkdir -p $offline_mirror_dir/ mkdir -p $offline_ruby_dir/ # We base our ISO on the official arch ISO (releng) config -cp -r archiso/configs/releng/* $build_cache_dir/ +cp -r /archiso/configs/releng/* $build_cache_dir/ rm "$build_cache_dir/airootfs/etc/motd" +disable_reflector # Bring in our configs cp -r /configs/* $build_cache_dir/ @@ -108,35 +108,50 @@ mkdir -p "$build_cache_dir/airootfs/root" curl -fsSL -o "$build_cache_dir/airootfs/root/configurator" \ "https://raw.githubusercontent.com/$OMARCHY_CONFIGURATOR_REPO/$OMARCHY_CONFIGURATOR_REF/configurator" +if [ "$OMARCHY_BUILD_MODE" = "online" ]; then + echo "$OMARCHY_INSTALLER_REPO" >$build_cache_dir/airootfs/root/omarchy_installer_repo.txt + echo "$OMARCHY_INSTALLER_REF" >$build_cache_dir/airootfs/root/omarchy_installer_ref.txt + echo "$OMARCHY_INSTALLER_URL" >$build_cache_dir/airootfs/root/omarchy_installer_url.txt + echo "online" >$build_cache_dir/airootfs/root/omarchy_install_mode.txt +else + echo "offline" >$build_cache_dir/airootfs/root/omarchy_install_mode.txt +fi + # Add our additional packages to packages.x86_64 printf '%s\n' "${arch_packages[@]}" >>"$build_cache_dir/packages.x86_64" -prepare_offline_mirror -make_archiso_offline +if [ "$OMARCHY_BUILD_MODE" = "offline" ]; then + prepare_offline_mirror -# Download Ruby tarball if not already cached -ruby_tarball="ruby-3.4.5-rails-8.0.2.1-x86_64.tar.gz" -if [ ! -f "$offline_ruby_dir/$ruby_tarball" ]; then - echo "Downloading Ruby tarball..." - curl -fsSL -o "$offline_ruby_dir/$ruby_tarball" \ - "https://pkgs.omarchy.org/ruby/$ruby_tarball" -else - echo "Ruby tarball already cached, skipping download" + # Download Ruby tarball if not already cached + ruby_tarball="ruby-3.4.5-rails-8.0.2.1-x86_64.tar.gz" + if [ ! -f "$offline_ruby_dir/$ruby_tarball" ]; then + echo "Downloading Ruby tarball..." + curl -fsSL -o "$offline_ruby_dir/$ruby_tarball" \ + "https://pkgs.omarchy.org/ruby/$ruby_tarball" + else + echo "Ruby tarball already cached, skipping download" + fi + + # Create a symlink to the offline mirror instead of duplicating it. + # mkarchiso needs packages at /var/cache/omarchy/mirror/offline in the container, + # but they're actually in $build_cache_dir/airootfs/var/cache/omarchy/mirror/offline + mkdir -p /var/cache/omarchy/mirror + ln -s "$offline_mirror_dir" "/var/cache/omarchy/mirror/offline" fi # Install Python packages for the installer into the ISO # file system. pip install "${python_packages[@]}" -# Copy the offline pacman.conf to the ISO's /etc directory -# so the live environment uses our offline mirror when booted -cp $build_cache_dir/pacman.conf "$build_cache_dir/airootfs/etc/pacman.conf" +if [ "$OMARCHY_BUILD_MODE" = "online" ]; then + # Copy the online version so we use it for build and ISO boot + cp $build_cache_dir/pacman-online.conf $build_cache_dir/pacman.conf +fi -# Create a symlink to the offline mirror instead of duplicating it. -# mkarchiso needs packages at /var/cache/omarchy/mirror/offline in the container, -# but they're actually in $build_cache_dir/airootfs/var/cache/omarchy/mirror/offline -mkdir -p /var/cache/omarchy/mirror -ln -s "$offline_mirror_dir" "/var/cache/omarchy/mirror/offline" +# Copy the pacman.conf to the ISO's /etc directory so the live environment uses our +# same config when booted +cp $build_cache_dir/pacman.conf "$build_cache_dir/airootfs/etc/pacman.conf" # Finally, we assemble the entire ISO mkarchiso -v -w "$build_cache_dir/work/" -o "/out/" "$build_cache_dir/" diff --git a/builder/cmds/omarchy-upload-install-log b/builder/cmds/omarchy-upload-install-log deleted file mode 100644 index ffa1cb8..0000000 --- a/builder/cmds/omarchy-upload-install-log +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/bash - -# Upload install log(s) to 0x0.st - -ARCHINSTALL_LOG="/var/log/archinstall/install.log" -OMARCHY_LOG="/var/log/omarchy-install.log" -COMBINED_LOG="/tmp/combined-install.log" - -# Combine whatever logs exist (archinstall first, then omarchy) -cat $ARCHINSTALL_LOG $OMARCHY_LOG >"$COMBINED_LOG" 2>/dev/null - -if [ ! -s "$COMBINED_LOG" ]; then - echo "Error: No install logs found" - exit 1 -fi - -echo "Uploading installation log to 0x0.st..." -echo "" - -URL=$(curl -sF "file=@$COMBINED_LOG" -Fexpires=24 https://0x0.st) - -if [ $? -eq 0 ] && [ -n "$URL" ]; then - echo "✓ Log uploaded successfully!" - echo "Share this URL with support:" - echo "" - echo " $URL" - echo "" - echo "This link will expire in 24 hours." -else - echo "Error: Failed to upload log file" - exit 1 -fi diff --git a/builder/icons/Basecamp.png b/builder/icons/Basecamp.png deleted file mode 100644 index 3edec48..0000000 Binary files a/builder/icons/Basecamp.png and /dev/null differ diff --git a/builder/icons/ChatGPT.png b/builder/icons/ChatGPT.png deleted file mode 100644 index cc68d78..0000000 Binary files a/builder/icons/ChatGPT.png and /dev/null differ diff --git a/builder/icons/Discord.png b/builder/icons/Discord.png deleted file mode 100644 index a82dbc6..0000000 Binary files a/builder/icons/Discord.png and /dev/null differ diff --git a/builder/icons/Disk Usage.png b/builder/icons/Disk Usage.png deleted file mode 100644 index 6cc55ba..0000000 Binary files a/builder/icons/Disk Usage.png and /dev/null differ diff --git a/builder/icons/Docker.png b/builder/icons/Docker.png deleted file mode 100644 index aeadd22..0000000 Binary files a/builder/icons/Docker.png and /dev/null differ diff --git a/builder/icons/Figma.png b/builder/icons/Figma.png deleted file mode 100644 index 62ffa90..0000000 Binary files a/builder/icons/Figma.png and /dev/null differ diff --git a/builder/icons/GitHub.png b/builder/icons/GitHub.png deleted file mode 100644 index f3248e4..0000000 Binary files a/builder/icons/GitHub.png and /dev/null differ diff --git a/builder/icons/Google Contacts.png b/builder/icons/Google Contacts.png deleted file mode 100644 index 6d99dc8..0000000 Binary files a/builder/icons/Google Contacts.png and /dev/null differ diff --git a/builder/icons/Google Messages.png b/builder/icons/Google Messages.png deleted file mode 100644 index bc911a5..0000000 Binary files a/builder/icons/Google Messages.png and /dev/null differ diff --git a/builder/icons/Google Photos.png b/builder/icons/Google Photos.png deleted file mode 100644 index 8b8c642..0000000 Binary files a/builder/icons/Google Photos.png and /dev/null differ diff --git a/builder/icons/HEY.png b/builder/icons/HEY.png deleted file mode 100644 index 3ac92d9..0000000 Binary files a/builder/icons/HEY.png and /dev/null differ diff --git a/builder/icons/WhatsApp.png b/builder/icons/WhatsApp.png deleted file mode 100644 index 10ecdfb..0000000 Binary files a/builder/icons/WhatsApp.png and /dev/null differ diff --git a/builder/icons/X.png b/builder/icons/X.png deleted file mode 100644 index 99131de..0000000 Binary files a/builder/icons/X.png and /dev/null differ diff --git a/builder/icons/YouTube.png b/builder/icons/YouTube.png deleted file mode 100644 index 46ed4ca..0000000 Binary files a/builder/icons/YouTube.png and /dev/null differ diff --git a/builder/icons/Zoom.png b/builder/icons/Zoom.png deleted file mode 100644 index 622db52..0000000 Binary files a/builder/icons/Zoom.png and /dev/null differ diff --git a/builder/online.sh b/builder/online.sh deleted file mode 100755 index 54ad0a4..0000000 --- a/builder/online.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash -set -e - -# Note that these are packages installed to the Arch container used to build the ISO. -pacman-key --init -pacman --noconfirm -Sy archlinux-keyring archiso sudo base-devel git gum - -# Packages needed for the Omarchy configurator (installer will fetch its own) -arch_packages=(git gum openssl iw jq) - -# We build our iso here -cache_dir=$(realpath --canonicalize-missing ~/.cache/omarchy/iso_$(date +%Y-%m-%d)) -mkdir -p $cache_dir -cd $cache_dir - -# We base our ISO on the official arch ISO (releng) config -cp -r /archiso/configs/releng/* . - -# Add our needed packages to packages.x86_64 -printf '%s\n' "${arch_packages[@]}" >>"packages.x86_64" - -# Retrieve the latest configurator for setting up user and selecting install disk. -curl -fsSL -o "airootfs/root/configurator" \ - "https://raw.githubusercontent.com/$OMARCHY_CONFIGURATOR_REPO/$OMARCHY_CONFIGURATOR_REF/configurator" - -echo "$OMARCHY_INSTALLER_REPO" >airootfs/root/omarchy_installer_repo.txt -echo "$OMARCHY_INSTALLER_REF" >airootfs/root/omarchy_installer_ref.txt -echo "$OMARCHY_INSTALLER_URL" >airootfs/root/omarchy_installer_url.txt - -# Avoid using reflector for mirror identification as we are relying on the global CDN -rm "airootfs/etc/systemd/system/multi-user.target.wants/reflector.service" -rm -rf "airootfs/etc/systemd/system/reflector.service.d" -rm -rf "airootfs/etc/xdg/reflector" - -# Ensure the Omarchy installer launches automatically on boot -cp /builder/cmds/autostart.sh airootfs/root/.automated_script.sh - -# Patch the default archiso install files -for patch in /builder/patches/*.patch; do - git apply "$patch" -done - -# Remove the default motd -rm airootfs/etc/motd - -# Finally, we assemble the entire ISO -mkarchiso -v -w "$cache_dir/work/" -o "/out/" "$cache_dir/" diff --git a/builder/patches/disable-progress-bar.patch b/builder/patches/disable-progress-bar.patch deleted file mode 100644 index 1c1be3e..0000000 --- a/builder/patches/disable-progress-bar.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/pacman.conf -+++ b/pacman.conf -@@ -31,7 +31,7 @@ Architecture = auto - # Misc options - #UseSyslog - #Color --#NoProgressBar -+NoProgressBar - # We cannot check disk space from within a chroot environment - #CheckSpace - #VerbosePkgLists diff --git a/builder/patches/efi-autoboot.patch b/builder/patches/efi-autoboot.patch deleted file mode 100644 index b09b983..0000000 --- a/builder/patches/efi-autoboot.patch +++ /dev/null @@ -1,8 +0,0 @@ ---- a/efiboot/loader/loader.conf -+++ b/efiboot/loader/loader.conf -@@ -1,3 +1,3 @@ --timeout 15 -+timeout 0 - default 01-archiso-x86_64-linux.conf --beep on -+beep off diff --git a/builder/patches/grub-autoboot.patch b/builder/patches/grub-autoboot.patch deleted file mode 100644 index f256722..0000000 --- a/builder/patches/grub-autoboot.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/grub/grub.cfg -+++ b/grub/grub.cfg -@@ -45,8 +45,8 @@ fi - - # Set default menu entry - default=archlinux --timeout=15 --timeout_style=menu -+timeout=0 -+timeout_style=hidden - - - # Menu entries diff --git a/builder/patches/offline/aur-mirror.patch b/builder/patches/offline/aur-mirror.patch deleted file mode 100644 index 434446b..0000000 --- a/builder/patches/offline/aur-mirror.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/pacman.conf -+++ b/pacman.conf -@@ -98,3 +98,7 @@ Include = /etc/pacman.d/mirrorlist - #[custom] - #SigLevel = Optional TrustAll - #Server = file:///home/custompkgs -+ -+[omarchy] -+SigLevel = Optional TrustAll -+Server = https://pkgs.omarchy.org/$arch diff --git a/builder/patches/offline/enable-multilib.patch b/builder/patches/offline/enable-multilib.patch deleted file mode 100644 index 7c79cd4..0000000 --- a/builder/patches/offline/enable-multilib.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/pacman.conf -+++ b/pacman.conf -@@ -90,8 +90,8 @@ Include = /etc/pacman.d/mirrorlist - #[multilib-testing] - #Include = /etc/pacman.d/mirrorlist - --#[multilib] --#Include = /etc/pacman.d/mirrorlist -+[multilib] -+Include = /etc/pacman.d/mirrorlist - - # An example of a custom package repository. See the pacman manpage for - # tips on creating your own repositories. diff --git a/builder/patches/offline/offline-mirror.patch b/builder/patches/offline/offline-mirror.patch deleted file mode 100644 index c0d1941..0000000 --- a/builder/patches/offline/offline-mirror.patch +++ /dev/null @@ -1,29 +0,0 @@ ---- a/pacman.conf -+++ b/pacman.conf -@@ -75,14 +75,14 @@ LocalFileSigLevel = Optional - #[core-testing] - #Include = /etc/pacman.d/mirrorlist - --[core] --Include = /etc/pacman.d/mirrorlist -+# [core] -+# Include = /etc/pacman.d/mirrorlist - - #[extra-testing] - #Include = /etc/pacman.d/mirrorlist - --[extra] --Include = /etc/pacman.d/mirrorlist -+# [extra] -+# Include = /etc/pacman.d/mirrorlist - - # If you want to run 32 bit applications on your x86_64 system, - # enable the multilib repositories as required here. -@@ -98,3 +98,7 @@ Include = /etc/pacman.d/mirrorlist - #[custom] - #SigLevel = Optional TrustAll - #Server = file:///home/custompkgs -+ -+[offline] -+SigLevel = Optional TrustAll -+Server = file:///var/cache/omarchy/mirror/offline/ diff --git a/builder/patches/profiledef.patch b/builder/patches/profiledef.patch deleted file mode 100644 index 400b253..0000000 --- a/builder/patches/profiledef.patch +++ /dev/null @@ -1,43 +0,0 @@ ---- a/profiledef.sh -+++ b/profiledef.sh -@@ -1,27 +1,28 @@ - #!/usr/bin/env bash - # shellcheck disable=SC2034 - --iso_name="archlinux" -+iso_name="omarchy" - iso_label="ARCH_$(date --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y%m)" --iso_publisher="Arch Linux " --iso_application="Arch Linux Live/Rescue DVD" -+iso_publisher="Omarchy " -+iso_application="Omarchy Installer" - iso_version="$(date --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y.%m.%d)" - install_dir="arch" - buildmodes=('iso') - bootmodes=('bios.syslinux.mbr' 'bios.syslinux.eltorito' -- 'uefi-ia32.systemd-boot.esp' 'uefi-x64.systemd-boot.esp' -- 'uefi-ia32.systemd-boot.eltorito' 'uefi-x64.systemd-boot.eltorito') -+ 'uefi-ia32.systemd-boot.esp' 'uefi-x64.systemd-boot.esp' -+ 'uefi-ia32.systemd-boot.eltorito' 'uefi-x64.systemd-boot.eltorito') - arch="x86_64" - pacman_conf="pacman.conf" - airootfs_image_type="squashfs" - airootfs_image_tool_options=('-comp' 'xz' '-Xbcj' 'x86' '-b' '1M' '-Xdict-size' '1M') - bootstrap_tarball_compression=('zstd' '-c' '-T0' '--auto-threads=logical' '--long' '-19') - file_permissions=( -- ["/etc/shadow"]="0:0:400" -- ["/root"]="0:0:750" -- ["/root/.automated_script.sh"]="0:0:755" -- ["/root/.gnupg"]="0:0:700" -- ["/usr/local/bin/choose-mirror"]="0:0:755" -- ["/usr/local/bin/Installation_guide"]="0:0:755" -- ["/usr/local/bin/livecd-sound"]="0:0:755" -+ ["/etc/shadow"]="0:0:400" -+ ["/root"]="0:0:750" -+ ["/root/.automated_script.sh"]="0:0:755" -+ ["/root/.gnupg"]="0:0:700" -+ ["/usr/local/bin/choose-mirror"]="0:0:755" -+ ["/root/configurator"]="0:0:755" -+ ["/var/cache/omarchy/mirror/offline/"]="0:0:775" -+ ["/usr/bin/tte"]="0:0:755" - ) diff --git a/configs/airootfs/root/.automated_script.sh b/configs/airootfs/root/.automated_script.sh index 07c191b..0d8226c 100644 --- a/configs/airootfs/root/.automated_script.sh +++ b/configs/airootfs/root/.automated_script.sh @@ -31,8 +31,12 @@ set_tokyo_night_colors() { run_configurator() { set -euo pipefail - # Configurator for user information, disk selection, and wifi configuration - NETWORK_NOT_NEEDED=true ./configurator + # Check if this is an online or offline build + if [ "${OMARCHY_INSTALL_MODE:-offline}" = "online" ]; then + ./configurator + else + NETWORK_NOT_NEEDED=true ./configurator + fi # Get username from installer config for reliable error recovery export OMARCHY_USER="$(jq -r '.users[0].username' user_credentials.json)" @@ -97,11 +101,13 @@ chroot_bash() { HOME=/home/$OMARCHY_USER \ arch-chroot -u $OMARCHY_USER /mnt/ \ env OMARCHY_CHROOT_INSTALL=1 \ - OMARCHY_OFFLINE_INSTALL=1 \ + OMARCHY_INSTALL_MODE="${OMARCHY_INSTALL_MODE:-offline}" \ OMARCHY_USER_NAME="$(