Compare commits
85
Commits
No files matched your search
@@ -1 +1,2 @@
|
||||
release/**
|
||||
vm-saves/**
|
||||
@@ -1,21 +1,19 @@
|
||||
# Omarchy ISO
|
||||
|
||||
The Omarchy ISO streamlines [the installation of Omarchy](https://learn.omacom.io/2/the-omarchy-manual/50/getting-started). It includes the [Omarchy Configurator](https://github.com/omacom-io/omarchy-configurator) as a front-end to archinstall and automatically launches the [Omarchy Installer](https://github.com/basecamp/omarchy) after base arch has been setup.
|
||||
The Omarchy ISO streamlines [the installation of Omarchy](https://learn.omacom.io/2/the-omarchy-manual/50/getting-started). It includes the Omarchy Configurator as a front-end to archinstall and automatically launches the [Omarchy Installer](https://github.com/basecamp/omarchy) after base arch has been setup.
|
||||
|
||||
## Downloading the latest ISO
|
||||
|
||||
[Download Omarchy Online ISO](https://iso.omarchy.org/omarchy-online.iso) (1.4GB)
|
||||
See the ISO link on [omarchy.org](https://omarchy.org).
|
||||
|
||||
## Creating the ISO
|
||||
|
||||
Run `./bin/omarchy-iso-make` and the output goes into `./release`.
|
||||
Run `./bin/omarchy-iso-make` and the output goes into `./release`. You can build from your local $OMARCHY_PATH for testing by using `--local-source` or from a checkout of the dev branch (instead of master) by using `--dev`.
|
||||
|
||||
### Environment Variables
|
||||
|
||||
You can customize the repositories used during the build process by passing in variables:
|
||||
|
||||
- `OMARCHY_CONFIGURATOR_REPO` - GitHub repository for the configurator (default: `omacom-io/omarchy-configurator`)
|
||||
- `OMARCHY_CONFIGURATOR_REF` - Git ref (branch/tag) for the configurator (default: `master`)
|
||||
- `OMARCHY_INSTALLER_REPO` - GitHub repository for the installer (default: `basecamp/omarchy`)
|
||||
- `OMARCHY_INSTALLER_REF` - Git ref (branch/tag) for the installer (default: `master`)
|
||||
|
||||
@@ -38,4 +36,4 @@ Run `./bin/omarchy-iso-upload [release/omarchy.iso]`. This requires you've confi
|
||||
|
||||
## Full release of the ISO
|
||||
|
||||
Run `./bin/omarchy-iso-make` to create, test, sign, and upload the ISO in one flow.
|
||||
Run `./bin/omarchy-iso-release` to create, test, sign, and upload the ISO in one flow.
|
||||
+16
-4
@@ -2,8 +2,19 @@
|
||||
|
||||
set -e
|
||||
|
||||
ISO="$1"
|
||||
REUSE="$2"
|
||||
|
||||
if [ $# -eq 0 ]; then
|
||||
ISO=$(ls -t release/*.iso 2>/dev/null | gum choose --header "Select ISO to boot")
|
||||
if gum confirm --default=false "Reuse existing disk?"; then
|
||||
REUSE="reuse"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -z "$ISO" ]; then
|
||||
echo "Usage: omarchy-iso-boot [release/omarchy.iso] [reuse]"
|
||||
echo " SSH available at: ssh -p 2222 root@localhost (after installing openssh)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -12,7 +23,7 @@ if ! pacman -Q qemu-full >/dev/null || ! pacman -Q edk2-ovmf >/dev/null; then
|
||||
fi
|
||||
|
||||
DISK="/tmp/omarchy-iso-boot.qcow2"
|
||||
if [[ ! -f $DISK || $2 != "reuse" ]]; then
|
||||
if [[ ! -f $DISK || $REUSE != "reuse" ]]; then
|
||||
qemu-img create -f qcow2 "$DISK" 20G
|
||||
cp /usr/share/edk2/x64/OVMF_VARS.4m.fd /tmp/OVMF_VARS.4m.fd
|
||||
fi
|
||||
@@ -26,10 +37,11 @@ qemu-system-x86_64 \
|
||||
-drive if=pflash,format=raw,file=/tmp/OVMF_VARS.4m.fd \
|
||||
-drive file="$DISK",format=qcow2,if=none,id=drive0 \
|
||||
-device virtio-blk-pci,drive=drive0,bootindex=1 \
|
||||
-drive file="$1",media=cdrom,if=none,format=raw,id=cdrom0 \
|
||||
-drive file="$ISO",media=cdrom,if=none,format=raw,id=cdrom0 \
|
||||
-device ide-cd,drive=cdrom0,bootindex=2 \
|
||||
-device virtio-vga-gl \
|
||||
-display gtk,gl=on \
|
||||
-usb -device usb-tablet \
|
||||
-netdev user,id=net0 \
|
||||
-device virtio-net-pci,netdev=net0
|
||||
-netdev user,id=net0,hostfwd=tcp::2222-:22 \
|
||||
-device virtio-net-pci,netdev=net0 \
|
||||
-boot menu=on
|
||||
+46
-21
@@ -4,18 +4,9 @@
|
||||
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
|
||||
@@ -24,9 +15,17 @@ while [[ $# -gt 0 ]]; do
|
||||
NO_BOOT_OFFER=1
|
||||
shift
|
||||
;;
|
||||
--local-source)
|
||||
LOCAL_SOURCE=1
|
||||
shift
|
||||
;;
|
||||
--dev)
|
||||
OMARCHY_INSTALLER_REF=dev
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
echo "Unknown option: $1"
|
||||
echo "Usage: $0 [--online|--offline] [--no-cache] [--no-boot-offer]"
|
||||
echo "Usage: $0 [--no-cache] [--no-boot-offer] [--local-source] [--dev]"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
@@ -41,22 +40,16 @@ 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"
|
||||
-e "OMARCHY_BUILD_MODE=$BUILD_MODE"
|
||||
-e "HOST_UID=$(id -u)"
|
||||
-e "HOST_GID=$(id -g)"
|
||||
-v "$BUILD_RELEASE_PATH/:/out/"
|
||||
-v "$BUILD_ROOT/$BUILD_SCRIPT:/$BUILD_SCRIPT:ro"
|
||||
-v "$BUILD_ROOT/archiso:/archiso:ro"
|
||||
@@ -64,14 +57,46 @@ DOCKER_ARGS=(
|
||||
-v "$BUILD_ROOT/configs:/configs:ro"
|
||||
)
|
||||
|
||||
# Mount omarchy-pkgs if it exists (for local package building)
|
||||
# Can be overridden with OMARCHY_PKGS_PATH environment variable
|
||||
if [ -z "$OMARCHY_PKGS_PATH" ]; then
|
||||
OMARCHY_PKGS_PATH="$BUILD_ROOT/../omarchy-pkgs"
|
||||
fi
|
||||
|
||||
if [ -d "$OMARCHY_PKGS_PATH" ]; then
|
||||
echo "Mounting omarchy-pkgs from: $OMARCHY_PKGS_PATH"
|
||||
OMARCHY_PKGS_PATH=$(realpath "$OMARCHY_PKGS_PATH")
|
||||
DOCKER_ARGS+=(-v "$OMARCHY_PKGS_PATH:/omarchy-pkgs:ro")
|
||||
else
|
||||
echo "Note: omarchy-pkgs not found at $OMARCHY_PKGS_PATH (build will fail)"
|
||||
fi
|
||||
|
||||
# Mount omarchy-installer for dev builds (optional)
|
||||
# Can be overridden with OMARCHY_INSTALLER_PATH environment variable
|
||||
# If not set, will auto-detect ../omarchy-installer for dev builds
|
||||
if [ -n "$LOCAL_SOURCE" ]; then
|
||||
if [ -z "$OMARCHY_INSTALLER_PATH" ]; then
|
||||
OMARCHY_INSTALLER_PATH="$BUILD_ROOT/../omarchy-installer"
|
||||
fi
|
||||
|
||||
if [ -d "$OMARCHY_INSTALLER_PATH" ]; then
|
||||
echo "Mounting omarchy-installer from: $OMARCHY_INSTALLER_PATH (dev mode)"
|
||||
OMARCHY_INSTALLER_PATH=$(realpath "$OMARCHY_INSTALLER_PATH")
|
||||
DOCKER_ARGS+=(-v "$OMARCHY_INSTALLER_PATH:/omarchy-installer:ro")
|
||||
DOCKER_ARGS+=(-e "OMARCHY_DEV_BUILD=1")
|
||||
else
|
||||
echo "Note: omarchy-installer not found at $OMARCHY_INSTALLER_PATH"
|
||||
echo " Will use git clone from PKGBUILD"
|
||||
fi
|
||||
fi
|
||||
|
||||
# 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 for the offline repo
|
||||
# Only applicable for offline builds and when --no-cache is not specified
|
||||
if [[ "$BUILD_MODE" == "offline" && -z "$NO_CACHE" ]]; then
|
||||
# Mount the build cache directory where packages are downloaded
|
||||
if [[ -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"
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
OMARCHY_INSTALLER_REF=dev \
|
||||
OMARCHY_INSTALL_URL=https://omarchy.org/install-dev \
|
||||
omarchy-iso-make
|
||||
Executable
+14
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
access_key=$(op read "op://Shared/Cloudflare Buckets/iso.omarchy.org/access_key_id" --account Omarchy)
|
||||
secret_access_key=$(op read "op://Shared/Cloudflare Buckets/iso.omarchy.org/secret_access_key" --account Omarchy)
|
||||
endpoint=$(op read "op://Shared/Cloudflare Buckets/iso.omarchy.org/endpoint" --account Omarchy)
|
||||
|
||||
cat > ~/.config/rclone/rclone.conf << EOF
|
||||
[Omarchy]
|
||||
type = s3
|
||||
provider = Cloudflare
|
||||
access_key_id = $access_key
|
||||
secret_access_key = $secret_access_key
|
||||
endpoint = $endpoint
|
||||
EOF
|
||||
+13
-12
@@ -1,30 +1,31 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ $# -eq 0 ]; then
|
||||
echo "Usage: omarchy-iso-release [version]"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
BUILD_ROOT=$(realpath "${BASH_SOURCE[0]%/*}/..")
|
||||
BUILD_RELEASE_PATH="$BUILD_ROOT/release"
|
||||
BULD_VERSION="$1"
|
||||
|
||||
# Make ISOs
|
||||
if [[ $1 != "--no-make" ]]; then
|
||||
echo -e "\e[32mMaking master ISO\e[0m"
|
||||
OMARCHY_INSTALLER_REF=master omarchy-iso-make --no-boot-offer
|
||||
echo -e "\e[32m\nMaking dev ISO\e[0m"
|
||||
OMARCHY_INSTALLER_REF=dev OMARCHY_INSTALL_URL=https://omarchy.org/install-dev omarchy-iso-make --no-boot-offer
|
||||
OMARCHY_INSTALLER_REF=master omarchy-iso-make --no-cache --no-boot-offer
|
||||
else
|
||||
echo -e "\e[31mSkipping remaking ISOs\e[0m"
|
||||
fi
|
||||
|
||||
# Sign and upload master ISO
|
||||
latest_master_iso=$(\ls -t "$BUILD_RELEASE_PATH"/*x86_64-master.iso | head -n1)
|
||||
release_master_iso="$BUILD_RELEASE_PATH/omarchy-online.iso"
|
||||
release_master_iso="$BUILD_RELEASE_PATH/omarchy-$BULD_VERSION.iso"
|
||||
cp "$latest_master_iso" "$release_master_iso"
|
||||
|
||||
echo -e "\e[32mSigning master ISO\e[0m"
|
||||
omarchy-iso-sign "$release_master_iso"
|
||||
omarchy-iso-upload "$release_master_iso"
|
||||
|
||||
# Sign and upload dev ISO
|
||||
latest_dev_iso=$(\ls -t "$BUILD_RELEASE_PATH"/*x86_64-dev.iso | head -n1)
|
||||
release_dev_iso="$BUILD_RELEASE_PATH/omarchy-online-dev.iso"
|
||||
cp "$latest_dev_iso" "$release_dev_iso"
|
||||
echo -e "\e[32mSigning dev ISO\e[0m"
|
||||
omarchy-iso-sign "$release_dev_iso"
|
||||
omarchy-iso-upload "$release_dev_iso"
|
||||
master_sha=$(sha256sum "$release_master_iso")
|
||||
echo -e "\e[32mSHA256 for master ISO: $master_sha\e[0m"
|
||||
|
||||
omarchy-iso-upload "$release_master_iso"
|
||||
@@ -6,8 +6,8 @@ if [ $# -eq 0 ]; then
|
||||
fi
|
||||
|
||||
if ! pacman -Q gnupg >/dev/null; then
|
||||
sudo pacman -s --noconfirm --needed --quiet gnupg
|
||||
echo "you'll need to generate a new key with: gpg --full-generate-key"
|
||||
sudo pacman -S --noconfirm --needed --quiet gnupg
|
||||
echo "You'll need to import key with: gpg --import path/to/signing-key.asc"
|
||||
fi
|
||||
|
||||
gnupg_user_key=$(gpg --list-secret-keys --keyid-format=long | awk '/^[[:space:]]/{print $1; exit}')
|
||||
|
||||
@@ -6,9 +6,12 @@ if [ $# -eq 0 ]; then
|
||||
fi
|
||||
|
||||
if [[ ! -f ~/.config/rclone/rclone.conf ]]; then
|
||||
echo "You must first configure rclone with the R2 credentials: rclone config"
|
||||
echo "You must first configure rclone with the R2 credentials: omarchy-iso-rclone-config"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
rclone copy $1 Omarchy:omarchy/ -P
|
||||
rclone copy $1.sig Omarchy:omarchy/ -P
|
||||
|
||||
if [[ -f $1.sig ]]; then
|
||||
rclone copy $1.sig Omarchy:omarchy/ -P
|
||||
fi
|
||||
Executable
+111
@@ -0,0 +1,111 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
VM_DIR="$(dirname "$SCRIPT_DIR")/vm-saves"
|
||||
TMP_DISK="/tmp/omarchy-iso-boot.qcow2"
|
||||
TMP_OVMF="/tmp/OVMF_VARS.4m.fd"
|
||||
|
||||
mkdir -p "$VM_DIR"
|
||||
|
||||
save_vm() {
|
||||
local name="$1"
|
||||
|
||||
if [[ -z "$name" ]]; then
|
||||
name=$(gum input --placeholder "Enter VM snapshot name")
|
||||
[[ -z "$name" ]] && exit 1
|
||||
fi
|
||||
|
||||
if [[ ! -f "$TMP_DISK" || ! -f "$TMP_OVMF" ]]; then
|
||||
echo "Error: No active VM found in /tmp"
|
||||
echo "Boot a VM first with: omarchy-iso-boot [iso]"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
local vm_path="$VM_DIR/$name"
|
||||
|
||||
if [[ -d "$vm_path" ]]; then
|
||||
if ! gum confirm "VM '$name' exists. Overwrite?"; then
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
|
||||
mkdir -p "$vm_path"
|
||||
|
||||
echo "Saving VM snapshot '$name'..."
|
||||
cp "$TMP_DISK" "$vm_path/omarchy-iso-boot.qcow2"
|
||||
cp "$TMP_OVMF" "$vm_path/OVMF_VARS.4m.fd"
|
||||
|
||||
gum style --foreground 212 "✓ Saved to $vm_path"
|
||||
}
|
||||
|
||||
list_vms() {
|
||||
if [[ ! -d "$VM_DIR" ]] || [[ -z "$(ls -A "$VM_DIR")" ]]; then
|
||||
echo "No VM snapshots found"
|
||||
return 1
|
||||
fi
|
||||
|
||||
echo "Available VM snapshots:"
|
||||
for vm in "$VM_DIR"/*; do
|
||||
[[ -d "$vm" ]] && echo " • $(basename "$vm")"
|
||||
done
|
||||
}
|
||||
|
||||
boot_vm() {
|
||||
local name="$1"
|
||||
|
||||
if [[ -z "$(ls -A "$VM_DIR" 2>/dev/null)" ]]; then
|
||||
echo "No VM snapshots available"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ -z "$name" ]]; then
|
||||
name=$(ls -1 "$VM_DIR" | gum choose --header "Select VM to boot:")
|
||||
[[ -z "$name" ]] && exit 0
|
||||
fi
|
||||
|
||||
local vm_path="$VM_DIR/$name"
|
||||
|
||||
if [[ ! -d "$vm_path" ]]; then
|
||||
echo "Error: VM '$name' not found"
|
||||
list_vms
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ -f "$TMP_DISK" ]] && ! gum confirm "Override existing /tmp VM?"; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "Copying VM '$name' to /tmp..."
|
||||
cp "$vm_path/omarchy-iso-boot.qcow2" "$TMP_DISK"
|
||||
cp "$vm_path/OVMF_VARS.4m.fd" "$TMP_OVMF"
|
||||
|
||||
gum style --foreground 212 "✓ VM ready. Booting..."
|
||||
|
||||
exec omarchy-iso-boot /dev/null reuse
|
||||
}
|
||||
|
||||
case "${1:-}" in
|
||||
save)
|
||||
save_vm "$2"
|
||||
;;
|
||||
boot)
|
||||
boot_vm "$2"
|
||||
;;
|
||||
list)
|
||||
list_vms
|
||||
;;
|
||||
*)
|
||||
gum style --border rounded --padding "0 1" --border-foreground 212 \
|
||||
"$(gum style --bold 'omarchy-vm') - VM snapshot manager" \
|
||||
"" \
|
||||
"$(gum style --foreground 245 'Commands:')" \
|
||||
" save [name] Save current VM from /tmp" \
|
||||
" boot [name] Boot saved VM (interactive if no name)" \
|
||||
" list List available VMs" \
|
||||
"" \
|
||||
"$(gum style --foreground 245 'Current VMs:')"
|
||||
list_vms 2>/dev/null || echo " None"
|
||||
;;
|
||||
esac
|
||||
@@ -0,0 +1,143 @@
|
||||
# Omarchy ISO Builder
|
||||
|
||||
## Overview
|
||||
|
||||
The ISO build system now integrates local package building for development workflows.
|
||||
|
||||
## Build Scripts
|
||||
|
||||
### build-iso.sh
|
||||
Main ISO build script that:
|
||||
1. Sets up Arch Linux build environment
|
||||
2. Builds omarchy-settings package locally (if omarchy-pkgs mounted)
|
||||
3. Installs omarchy-settings in the ISO
|
||||
4. Downloads remaining packages to offline mirror
|
||||
5. Assembles the final ISO image
|
||||
|
||||
### build-omarchy-packages.sh
|
||||
Builds omarchy-settings package locally from source:
|
||||
- Runs inside Docker container
|
||||
- Builds as `nobody` user (makepkg requirement)
|
||||
- Outputs package to `/tmp/omarchy-pkg-build/`
|
||||
- Exports `OMARCHY_SETTINGS_PKG` variable for build-iso.sh
|
||||
|
||||
## Package Integration
|
||||
|
||||
### omarchy-settings
|
||||
**Installed in ISO** - Provides EVERYTHING needed:
|
||||
- User skeleton files (`/etc/skel/`)
|
||||
- System configurations (`/etc/`)
|
||||
- Plymouth boot theme
|
||||
- Essential binaries (`omarchy-debug`, `omarchy-upload-log`)
|
||||
- Install scripts (`/usr/share/omarchy/install/`)
|
||||
- Default configs and migrations
|
||||
|
||||
**Size**: ~5-10MB
|
||||
**Purpose**: Complete self-contained package for ISO - no git clone needed!
|
||||
|
||||
### omarchy (future)
|
||||
**In offline mirror** - Full desktop environment:
|
||||
- All omarchy-* binaries
|
||||
- Install scripts and migrations
|
||||
- Themes and assets
|
||||
- Heavy dependencies (Hyprland, Waybar, etc.)
|
||||
|
||||
**Installed during**: Post-install phase in chroot
|
||||
|
||||
## Development Workflow
|
||||
|
||||
### Quick Build
|
||||
```bash
|
||||
# From omarchy-iso directory (uses default paths)
|
||||
omarchy-iso-make-dev
|
||||
|
||||
# Or with custom paths
|
||||
export OMARCHY_PKGS_PATH=/path/to/pkgs
|
||||
export OMARCHY_INSTALLER_PATH=/path/to/installer
|
||||
omarchy-iso-make-dev
|
||||
```
|
||||
|
||||
This will:
|
||||
1. Mount omarchy-pkgs into Docker container
|
||||
2. Mount omarchy-installer (if OMARCHY_INSTALLER_PATH set)
|
||||
3. Build omarchy-settings from local source
|
||||
4. Install it in the ISO
|
||||
5. Create bootable ISO with latest changes
|
||||
|
||||
See [ENV_VARS.md](../ENV_VARS.md) for all configuration options.
|
||||
|
||||
### Without Package Build
|
||||
If `omarchy-pkgs` directory is not mounted:
|
||||
- **Build will fail** with helpful error message
|
||||
- The ISO build now requires omarchy-settings package
|
||||
- No fallback to git clone (removed for simplicity)
|
||||
- Set `OMARCHY_PKGS_PATH` to enable builds
|
||||
|
||||
## Directory Structure
|
||||
|
||||
```
|
||||
omarchy-iso/
|
||||
├── bin/
|
||||
│ └── omarchy-iso-make # Main entry point (updated to mount omarchy-pkgs)
|
||||
├── builder/
|
||||
│ ├── build-iso.sh # Main ISO build (updated for package integration)
|
||||
│ ├── build-omarchy-packages.sh # New: Local package builder
|
||||
│ └── README.md # This file
|
||||
├── configs/
|
||||
│ ├── profiledef.sh # ISO profile (updated to remove manual file perms)
|
||||
│ └── ...
|
||||
└── release/
|
||||
└── omarchy-*.iso # Built ISOs
|
||||
```
|
||||
|
||||
## How It Works
|
||||
|
||||
1. **omarchy-iso-make** detects `../omarchy-pkgs` directory
|
||||
2. Mounts it read-only into Docker container at `/omarchy-pkgs`
|
||||
3. **build-iso.sh** checks for `/omarchy-pkgs` mount (REQUIRED!)
|
||||
4. Sources **build-omarchy-packages.sh** to build package
|
||||
5. Package is built with makepkg as `nobody` user
|
||||
6. Built package added to `packages.x86_64` list
|
||||
7. Copied to offline mirror
|
||||
8. mkarchiso installs it during ISO assembly
|
||||
9. ISO boots with omarchy-settings pre-installed
|
||||
10. **Everything works from package** - no git clone, no manual copying!
|
||||
|
||||
## Benefits
|
||||
|
||||
### For Development
|
||||
- ✅ No need to publish packages for testing
|
||||
- ✅ Instant iteration on configs and binaries
|
||||
- ✅ Test package integration in real ISO environment
|
||||
- ✅ Single command builds everything
|
||||
|
||||
### For Production
|
||||
- ✅ Same workflow works with published packages
|
||||
- ✅ Fallback to manual copying if needed
|
||||
- ✅ Reproducible builds
|
||||
- ✅ Version-locked packages
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Package build fails
|
||||
```bash
|
||||
# Check that omarchy-pkgs is mounted
|
||||
docker run --rm -v "$PWD/../omarchy-pkgs:/omarchy-pkgs:ro" archlinux ls -la /omarchy-pkgs
|
||||
```
|
||||
|
||||
### Manual file copying used instead of package
|
||||
- Ensure omarchy-pkgs directory exists at `../omarchy-pkgs`
|
||||
- Check Docker mount in omarchy-iso-make
|
||||
- Look for "Mounting omarchy-pkgs" message during build
|
||||
|
||||
### Permission errors
|
||||
- build-omarchy-packages.sh runs makepkg as `nobody` user
|
||||
- Temporary sudo access granted for pacman operations
|
||||
- Cleaned up after build
|
||||
|
||||
## Future Enhancements
|
||||
|
||||
1. Build full `omarchy` package locally
|
||||
2. Remove git clone of omarchy-installer entirely
|
||||
3. Use only packages for all file installation
|
||||
4. Support building other omarchy-* packages
|
||||
@@ -0,0 +1,14 @@
|
||||
alsa-firmware
|
||||
amd-ucode
|
||||
base
|
||||
base-devel
|
||||
efibootmgr
|
||||
intel-ucode
|
||||
linux-firmware
|
||||
linux
|
||||
limine
|
||||
omarchy-keyring
|
||||
openssh
|
||||
pipewire
|
||||
snapper
|
||||
sof-firmware
|
||||
+113
-121
@@ -2,156 +2,148 @@
|
||||
|
||||
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.
|
||||
# Note that these are packages installed to the Arch container used to build the ISO.
|
||||
pacman-key --init
|
||||
pacman --noconfirm -Sy archlinux-keyring
|
||||
pacman --noconfirm -Sy archiso git python-pip sudo base-devel jq
|
||||
pacman --noconfirm -Sy archiso git sudo base-devel jq grub
|
||||
|
||||
# Install omarchy-keyring for package verification during build
|
||||
# The [omarchy] repo is defined in /configs/pacman-online.conf with SigLevel = Optional TrustAll
|
||||
pacman --config /configs/pacman-online.conf --noconfirm -Sy omarchy-keyring
|
||||
pacman-key --populate omarchy
|
||||
|
||||
# Setup build locations
|
||||
build_cache_dir="/var/cache"
|
||||
offline_mirror_dir="$build_cache_dir/airootfs/var/cache/omarchy/mirror/offline"
|
||||
offline_ruby_dir="$build_cache_dir/airootfs/var/cache/omarchy/ruby"
|
||||
|
||||
# We need to fiddle with pip settings
|
||||
# in order to install to the correct place
|
||||
# as well as ignore some errors to make this less verbose
|
||||
export PIP_ROOT="$build_cache_dir/airootfs/"
|
||||
export PIP_ROOT_USER_ACTION="ignore"
|
||||
export PIP_NO_WARN_SCRIPT_LOCATION=1
|
||||
export PIP_BREAK_SYSTEM_PACKAGES=1
|
||||
|
||||
# These packages will be installed **into** the ISO, and
|
||||
# won't be available to either archinstall or omarchy installer.
|
||||
python_packages=(
|
||||
terminaltexteffects
|
||||
)
|
||||
arch_packages=(
|
||||
git
|
||||
gum
|
||||
jq
|
||||
openssl
|
||||
plymouth
|
||||
tzupdate # This is technically an AUR package
|
||||
)
|
||||
|
||||
prepare_offline_mirror() {
|
||||
# Certain packages in omarchy.packages are AUR packages.
|
||||
# These needs to be pre-built and placed in https://pkgs.omarchy.org/$arch
|
||||
echo "Reading and combining packages from all package files..."
|
||||
|
||||
# Combine all packages into one array
|
||||
# Start with base ISO packages (including our arch_packages already appended)
|
||||
all_packages=($(cat "$build_cache_dir/packages.x86_64"))
|
||||
|
||||
# Add packages from the omarchy installer's unified package list
|
||||
all_packages+=($(grep -v '^#' "$build_cache_dir/airootfs/root/omarchy/install/omarchy-base.packages" | grep -v '^$'))
|
||||
all_packages+=($(grep -v '^#' "$build_cache_dir/airootfs/root/omarchy/install/omarchy-other.packages" | grep -v '^$'))
|
||||
|
||||
# Add archinstall needed packages
|
||||
all_packages+=($(grep -v '^#' /builder/packages/archinstall.packages | grep -v '^$'))
|
||||
|
||||
if [ ${#all_packages[@]} -gt 0 ]; then
|
||||
mkdir -p /tmp/offlinedb
|
||||
|
||||
# Download all the packages to the offline mirror inside the ISO
|
||||
echo "Downloading all packages (including AUR) to offline mirror: ${all_packages[@]}"
|
||||
pacman --config /configs/pacman-online.conf \
|
||||
--noconfirm -Syw "${all_packages[@]}" \
|
||||
--cachedir $offline_mirror_dir/ \
|
||||
--dbpath /tmp/offlinedb
|
||||
|
||||
repo-add --new "$offline_mirror_dir/offline.db.tar.gz" "$offline_mirror_dir/"*.pkg.tar.zst
|
||||
|
||||
rm "$build_cache_dir/airootfs/etc/pacman.d/hooks/uncomment-mirrors.hook"
|
||||
fi
|
||||
}
|
||||
|
||||
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"
|
||||
}
|
||||
|
||||
#######################
|
||||
# Build process start
|
||||
#######################
|
||||
|
||||
mkdir -p $build_cache_dir/
|
||||
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/
|
||||
rm "$build_cache_dir/airootfs/etc/motd"
|
||||
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"
|
||||
|
||||
# Bring in our configs
|
||||
cp -r /configs/* $build_cache_dir/
|
||||
|
||||
# Clone Omarchy itself
|
||||
git clone -b $OMARCHY_INSTALLER_REF https://github.com/$OMARCHY_INSTALLER_REPO.git "$build_cache_dir/airootfs/root/omarchy"
|
||||
|
||||
# Make log uploader available in the ISO too
|
||||
mkdir -p "$build_cache_dir/airootfs/usr/local/bin/"
|
||||
cp "$build_cache_dir/airootfs/root/omarchy/bin/omarchy-upload-log" "$build_cache_dir/airootfs/usr/local/bin/omarchy-upload-log"
|
||||
|
||||
# Copy the Omarchy Plymouth theme to the ISO
|
||||
mkdir -p "$build_cache_dir/airootfs/usr/share/plymouth/themes/omarchy"
|
||||
cp -r "$build_cache_dir/airootfs/root/omarchy/default/plymouth/"* "$build_cache_dir/airootfs/usr/share/plymouth/themes/omarchy/"
|
||||
|
||||
# Download the configurator
|
||||
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
|
||||
# Build omarchy-settings package locally
|
||||
# This package provides EVERYTHING needed for the ISO:
|
||||
# - User configs (/etc/skel/)
|
||||
# - System configs (/etc/)
|
||||
# - Plymouth theme
|
||||
# - Essential binaries (debug, upload-log)
|
||||
# - Install scripts (/usr/share/omarchy/install/)
|
||||
if [ -d "/omarchy-pkgs" ]; then
|
||||
echo "========================================="
|
||||
echo "Building omarchy-settings package locally"
|
||||
echo "========================================="
|
||||
source /builder/build-omarchy-packages.sh
|
||||
|
||||
# Add omarchy packages to ISO
|
||||
# omarchy-settings provides configs and will be installed in ISO
|
||||
# omarchy-installer provides install scripts and will be installed in ISO
|
||||
echo "omarchy-settings" >> "$build_cache_dir/packages.x86_64"
|
||||
echo "omarchy-installer" >> "$build_cache_dir/packages.x86_64"
|
||||
|
||||
# Copy built packages to offline mirror (for installation on target system)
|
||||
cp "$OMARCHY_SETTINGS_PKG" "$offline_mirror_dir/"
|
||||
cp "$OMARCHY_INSTALLER_PKG" "$offline_mirror_dir/"
|
||||
cp "$OMARCHY_PKG" "$offline_mirror_dir/"
|
||||
cp "$OMARCHY_LIMINE_PKG" "$offline_mirror_dir/"
|
||||
|
||||
echo "✓ omarchy-settings will be installed in ISO (configs, binaries)"
|
||||
echo "✓ omarchy-installer will be installed in ISO (install scripts, helpers)"
|
||||
echo "✓ omarchy-limine available in offline mirror for installation"
|
||||
echo "✓ All omarchy packages available in offline mirror for installation"
|
||||
echo "✓ No git clone needed - everything comes from packages!"
|
||||
else
|
||||
echo "offline" >$build_cache_dir/airootfs/root/omarchy_install_mode.txt
|
||||
echo "ERROR: /omarchy-pkgs not mounted!"
|
||||
echo "The ISO build now requires omarchy-settings package."
|
||||
echo "Please set OMARCHY_PKGS_PATH or ensure ../omarchy-pkgs exists."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Download and verify Node.js binary for offline installation
|
||||
NODE_DIST_URL="https://nodejs.org/dist/latest"
|
||||
|
||||
# Get checksums and parse filename and SHA
|
||||
NODE_SHASUMS=$(curl -fsSL "$NODE_DIST_URL/SHASUMS256.txt")
|
||||
NODE_FILENAME=$(echo "$NODE_SHASUMS" | grep "linux-x64.tar.gz" | awk '{print $2}')
|
||||
NODE_SHA=$(echo "$NODE_SHASUMS" | grep "linux-x64.tar.gz" | awk '{print $1}')
|
||||
|
||||
# Download the tarball
|
||||
curl -fsSL "$NODE_DIST_URL/$NODE_FILENAME" -o "/tmp/$NODE_FILENAME"
|
||||
|
||||
# Verify SHA256 checksum
|
||||
echo "$NODE_SHA /tmp/$NODE_FILENAME" | sha256sum -c - || {
|
||||
echo "ERROR: Node.js checksum verification failed!"
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Copy to ISO
|
||||
mkdir -p "$build_cache_dir/airootfs/opt/packages/"
|
||||
cp "/tmp/$NODE_FILENAME" "$build_cache_dir/airootfs/opt/packages/"
|
||||
|
||||
# Add our additional packages to packages.x86_64
|
||||
arch_packages=(linux-t2 git gum jq openssl plymouth tzupdate omarchy-keyring python-terminaltexteffects)
|
||||
printf '%s\n' "${arch_packages[@]}" >>"$build_cache_dir/packages.x86_64"
|
||||
|
||||
if [ "$OMARCHY_BUILD_MODE" = "offline" ]; then
|
||||
prepare_offline_mirror
|
||||
# Build list of all the packages needed for the offline mirror
|
||||
# Start with packages.x86_64 but exclude locally-built packages
|
||||
all_packages=($(cat "$build_cache_dir/packages.x86_64" | grep -vE '^(omarchy|omarchy-settings|omarchy-installer|omarchy-limine)$'))
|
||||
|
||||
# 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"
|
||||
# Add omarchy package lists from source, excluding locally-built packages
|
||||
if [ -n "$OMARCHY_INSTALLER_SRC" ] && [ -d "$OMARCHY_INSTALLER_SRC" ]; then
|
||||
# Filter out locally-built packages and known problematic packages
|
||||
all_packages+=($(grep -v '^#' "$OMARCHY_INSTALLER_SRC/install/omarchy-base.packages" | grep -v '^$' | grep -vE '^(omarchy|omarchy-settings|omarchy-installer|omarchy-limine)$'))
|
||||
all_packages+=($(grep -v '^#' "$OMARCHY_INSTALLER_SRC/install/omarchy-other.packages" | grep -v '^$' | grep -vE '^qt5-remoteobjects$'))
|
||||
else
|
||||
echo "WARNING: Could not find omarchy package lists, offline mirror may be incomplete"
|
||||
fi
|
||||
|
||||
# Install Python packages for the installer into the ISO
|
||||
# file system.
|
||||
pip install "${python_packages[@]}"
|
||||
all_packages+=($(grep -v '^#' /builder/archinstall.packages | grep -v '^$' | grep -vE '^(omarchy|omarchy-settings|omarchy-installer|omarchy-limine)$'))
|
||||
|
||||
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
|
||||
# Remove duplicates
|
||||
all_packages=($(printf '%s\n' "${all_packages[@]}" | sort -u))
|
||||
|
||||
# Download all the packages to the offline mirror inside the ISO
|
||||
# Use --needed to skip packages that are already in cache
|
||||
# Use --noconfirm to avoid interactive prompts
|
||||
mkdir -p /tmp/offlinedb
|
||||
echo "Downloading ${#all_packages[@]} packages to offline mirror..."
|
||||
pacman --config /configs/pacman-online.conf --noconfirm -Syw "${all_packages[@]}" --cachedir $offline_mirror_dir/ --dbpath /tmp/offlinedb --needed
|
||||
|
||||
# Build repository database for the offline mirror
|
||||
# First, create the database from all downloaded packages
|
||||
echo "Building offline repository database..."
|
||||
repo-add "$offline_mirror_dir/offline.db.tar.gz" "$offline_mirror_dir/"*.pkg.tar.zst
|
||||
|
||||
# Note: Our locally built packages (omarchy, omarchy-settings) were copied earlier
|
||||
# and are now included in the repository database
|
||||
|
||||
# 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"
|
||||
|
||||
# Create missing device-mapper udev rules file to silence mkinitcpio warning
|
||||
# This file was removed in recent device-mapper versions but mkinitcpio still references it
|
||||
mkdir -p /usr/lib/initcpio/udev
|
||||
touch /usr/lib/initcpio/udev/11-dm-initramfs.rules
|
||||
|
||||
# Finally, we assemble the entire ISO
|
||||
mkarchiso -v -w "$build_cache_dir/work/" -o "/out/" "$build_cache_dir/"
|
||||
|
||||
# Fix ownership of output files to match host user
|
||||
if [ -n "$HOST_UID" ] && [ -n "$HOST_GID" ]; then
|
||||
chown -R "$HOST_UID:$HOST_GID" /out/
|
||||
fi
|
||||
Executable
+219
@@ -0,0 +1,219 @@
|
||||
#!/bin/bash
|
||||
# Build omarchy packages locally for ISO integration
|
||||
# This runs inside the Docker container during ISO build
|
||||
|
||||
set -e
|
||||
|
||||
echo "========================================="
|
||||
echo "Building omarchy-settings package locally"
|
||||
echo "========================================="
|
||||
|
||||
# Packages will be built in /tmp/omarchy-pkg-build
|
||||
BUILD_DIR="/tmp/omarchy-pkg-build"
|
||||
# Clean old builds to avoid checksum issues
|
||||
rm -rf "$BUILD_DIR"
|
||||
mkdir -p "$BUILD_DIR"
|
||||
|
||||
# Create a writable build directory
|
||||
WORK_DIR="/tmp/omarchy-pkg-work"
|
||||
# Clean old work directory
|
||||
rm -rf "$WORK_DIR"
|
||||
mkdir -p "$WORK_DIR"
|
||||
|
||||
# Copy package files to writable location
|
||||
echo "Setting up build directory..."
|
||||
cp -r /omarchy-pkgs/pkgbuilds/omarchy-settings "$WORK_DIR/"
|
||||
cd "$WORK_DIR/omarchy-settings"
|
||||
|
||||
# Set PKGDEST to control where built packages go
|
||||
export PKGDEST="$BUILD_DIR"
|
||||
|
||||
# Check if we should use dev build (local source)
|
||||
if [ -n "$OMARCHY_DEV_BUILD" ] && [ -d "/omarchy-installer" ]; then
|
||||
echo "========================================="
|
||||
echo "DEV MODE: Using locally mounted source"
|
||||
echo "========================================="
|
||||
|
||||
# Source the dev PKGBUILD patch
|
||||
source /builder/templates/dev-pkgbuild-patch.sh
|
||||
convert_to_dev_pkgbuild "PKGBUILD"
|
||||
|
||||
BUILD_FILE="PKGBUILD.dev"
|
||||
BUILD_FLAGS="--noconfirm --skippgpcheck --skipchecksums -f"
|
||||
echo "✓ Will build from local source (no git clone)"
|
||||
else
|
||||
echo "========================================="
|
||||
echo "PRODUCTION MODE: Using git source"
|
||||
echo "========================================="
|
||||
BUILD_FILE="PKGBUILD"
|
||||
BUILD_FLAGS="--noconfirm --skippgpcheck"
|
||||
echo "✓ Will git clone from repository"
|
||||
fi
|
||||
|
||||
# Sync package databases (needed for dependency resolution)
|
||||
echo "Syncing package databases..."
|
||||
pacman -Sy --noconfirm
|
||||
|
||||
# Build the package
|
||||
# Note: The container runs as root, but makepkg refuses to run as root
|
||||
# Create a fresh build user (nobody account is expired in base image)
|
||||
if ! id builder &>/dev/null; then
|
||||
useradd -m -s /bin/bash builder
|
||||
fi
|
||||
|
||||
# Give builder ownership
|
||||
chown -R builder:builder "$WORK_DIR/omarchy-settings"
|
||||
chown -R builder:builder "$BUILD_DIR"
|
||||
|
||||
# Allow builder to run pacman without password (needed for dependency installation)
|
||||
echo "builder ALL=(ALL) NOPASSWD: /usr/bin/pacman" > /etc/sudoers.d/99-builder-pacman
|
||||
chmod 440 /etc/sudoers.d/99-builder-pacman
|
||||
|
||||
# Build the package as builder user (makepkg will install dependencies via sudo)
|
||||
su builder -c "cd $WORK_DIR/omarchy-settings && makepkg -p $BUILD_FILE $BUILD_FLAGS -s"
|
||||
|
||||
# Find the built package
|
||||
BUILT_PACKAGE=$(ls -t "$BUILD_DIR"/omarchy-settings-*.pkg.tar.zst 2>/dev/null | head -n1)
|
||||
|
||||
if [ -z "$BUILT_PACKAGE" ]; then
|
||||
echo "ERROR: Failed to build omarchy-settings package"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "✓ Successfully built: $(basename $BUILT_PACKAGE)"
|
||||
echo "Package location: $BUILT_PACKAGE"
|
||||
|
||||
# Export the path for use by build-iso.sh
|
||||
export OMARCHY_SETTINGS_PKG="$BUILT_PACKAGE"
|
||||
|
||||
# Export the source directory for accessing package lists before package is installed
|
||||
# Check both possible locations (dev mode uses /omarchy-installer, prod uses src/)
|
||||
if [ -d "/omarchy-installer" ]; then
|
||||
export OMARCHY_INSTALLER_SRC="/omarchy-installer"
|
||||
echo "✓ Package source available at: $OMARCHY_INSTALLER_SRC (mounted)"
|
||||
elif [ -d "$WORK_DIR/omarchy-settings/src/omarchy-installer" ]; then
|
||||
export OMARCHY_INSTALLER_SRC="$WORK_DIR/omarchy-settings/src/omarchy-installer"
|
||||
echo "✓ Package source available at: $OMARCHY_INSTALLER_SRC (from build)"
|
||||
fi
|
||||
|
||||
echo "✓ Package contains everything needed for ISO (configs, package lists, binaries, theme)"
|
||||
|
||||
# Now build the omarchy-installer package
|
||||
echo ""
|
||||
echo "========================================="
|
||||
echo "Building omarchy-installer package"
|
||||
echo "========================================="
|
||||
|
||||
# Copy omarchy-installer package files to writable location
|
||||
cp -r /omarchy-pkgs/pkgbuilds/omarchy-installer "$WORK_DIR/"
|
||||
cd "$WORK_DIR/omarchy-installer"
|
||||
|
||||
# Check if we should use dev build
|
||||
if [ -n "$OMARCHY_DEV_BUILD" ] && [ -d "/omarchy-installer" ]; then
|
||||
echo "DEV MODE: Using locally mounted source"
|
||||
|
||||
# Generate dev PKGBUILD
|
||||
source /builder/templates/dev-pkgbuild-patch.sh
|
||||
convert_to_dev_pkgbuild "PKGBUILD"
|
||||
|
||||
INSTALLER_BUILD_FILE="PKGBUILD.dev"
|
||||
INSTALLER_BUILD_FLAGS="--noconfirm --skippgpcheck --skipchecksums -f"
|
||||
else
|
||||
echo "PRODUCTION MODE: Using git source"
|
||||
INSTALLER_BUILD_FILE="PKGBUILD"
|
||||
INSTALLER_BUILD_FLAGS="--noconfirm --skippgpcheck"
|
||||
fi
|
||||
|
||||
# Give builder ownership
|
||||
chown -R builder:builder "$WORK_DIR/omarchy-installer"
|
||||
|
||||
# Build the omarchy-installer package
|
||||
su builder -c "cd $WORK_DIR/omarchy-installer && makepkg -p $INSTALLER_BUILD_FILE $INSTALLER_BUILD_FLAGS -d"
|
||||
|
||||
# Find the built package
|
||||
OMARCHY_INSTALLER_PKG=$(ls -t "$BUILD_DIR"/omarchy-installer-*.pkg.tar.zst 2>/dev/null | head -n1)
|
||||
|
||||
if [ -z "$OMARCHY_INSTALLER_PKG" ]; then
|
||||
echo "ERROR: Failed to build omarchy-installer package"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "✓ Successfully built: $(basename $OMARCHY_INSTALLER_PKG)"
|
||||
echo "Package location: $OMARCHY_INSTALLER_PKG"
|
||||
|
||||
# Now build the full omarchy package for offline mirror
|
||||
echo ""
|
||||
echo "========================================="
|
||||
echo "Building omarchy meta-package"
|
||||
echo "========================================="
|
||||
|
||||
# Copy omarchy package files to writable location
|
||||
cp -r /omarchy-pkgs/pkgbuilds/omarchy "$WORK_DIR/"
|
||||
cd "$WORK_DIR/omarchy"
|
||||
|
||||
# Check if we should use dev build
|
||||
if [ -n "$OMARCHY_DEV_BUILD" ] && [ -d "/omarchy-installer" ]; then
|
||||
echo "DEV MODE: Using locally mounted source"
|
||||
|
||||
# Generate dev PKGBUILD
|
||||
source /builder/templates/dev-pkgbuild-patch.sh
|
||||
convert_to_dev_pkgbuild "PKGBUILD"
|
||||
|
||||
OMARCHY_BUILD_FILE="PKGBUILD.dev"
|
||||
OMARCHY_BUILD_FLAGS="--noconfirm --skippgpcheck --skipchecksums -f"
|
||||
else
|
||||
echo "PRODUCTION MODE: Using git source"
|
||||
OMARCHY_BUILD_FILE="PKGBUILD"
|
||||
OMARCHY_BUILD_FLAGS="--noconfirm --skippgpcheck"
|
||||
fi
|
||||
|
||||
# Give builder ownership
|
||||
chown -R builder:builder "$WORK_DIR/omarchy"
|
||||
|
||||
# Build the omarchy package
|
||||
# Note: Skip dependency checks (-d) since we're just packaging files, not running them
|
||||
# The dependencies will be resolved when the package is installed in the actual system
|
||||
su builder -c "cd $WORK_DIR/omarchy && makepkg -p $OMARCHY_BUILD_FILE $OMARCHY_BUILD_FLAGS -d"
|
||||
|
||||
# Find the built package
|
||||
OMARCHY_PKG=$(ls -t "$BUILD_DIR"/omarchy-*.pkg.tar.zst 2>/dev/null | head -n1)
|
||||
|
||||
if [ -z "$OMARCHY_PKG" ]; then
|
||||
echo "ERROR: Failed to build omarchy package"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "✓ Successfully built: $(basename $OMARCHY_PKG)"
|
||||
echo "Package location: $OMARCHY_PKG"
|
||||
|
||||
# Now build the omarchy-limine package
|
||||
echo ""
|
||||
echo "========================================="
|
||||
echo "Building omarchy-limine package"
|
||||
echo "========================================="
|
||||
|
||||
# Copy omarchy-limine package files to writable location
|
||||
cp -r /omarchy-pkgs/pkgbuilds/omarchy-limine "$WORK_DIR/"
|
||||
cd "$WORK_DIR/omarchy-limine"
|
||||
|
||||
# Give builder ownership
|
||||
chown -R builder:builder "$WORK_DIR/omarchy-limine"
|
||||
|
||||
# Build the omarchy-limine package (no source needed, just config files)
|
||||
su builder -c "cd $WORK_DIR/omarchy-limine && makepkg --noconfirm --skippgpcheck -d"
|
||||
|
||||
# Find the built package
|
||||
OMARCHY_LIMINE_PKG=$(ls -t "$BUILD_DIR"/omarchy-limine-*.pkg.tar.zst 2>/dev/null | head -n1)
|
||||
|
||||
if [ -z "$OMARCHY_LIMINE_PKG" ]; then
|
||||
echo "ERROR: Failed to build omarchy-limine package"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "✓ Successfully built: $(basename $OMARCHY_LIMINE_PKG)"
|
||||
echo "Package location: $OMARCHY_LIMINE_PKG"
|
||||
|
||||
# Export for use by build-iso.sh
|
||||
export OMARCHY_PKG="$OMARCHY_PKG"
|
||||
export OMARCHY_INSTALLER_PKG="$OMARCHY_INSTALLER_PKG"
|
||||
export OMARCHY_LIMINE_PKG="$OMARCHY_LIMINE_PKG"
|
||||
@@ -1,40 +0,0 @@
|
||||
nano
|
||||
vim
|
||||
openssh
|
||||
htop
|
||||
wireless_tools
|
||||
wpa_supplicant
|
||||
smartmontools
|
||||
xdg-utils
|
||||
dunst
|
||||
kitty
|
||||
dolphin
|
||||
wofi
|
||||
qt5-wayland
|
||||
qt6-wayland
|
||||
polkit-kde-agent
|
||||
grim
|
||||
xorg-server
|
||||
xorg-xinit
|
||||
mesa
|
||||
xf86-video-amdgpu
|
||||
xf86-video-ati
|
||||
xf86-video-nouveau
|
||||
libva-mesa-driver
|
||||
libva-intel-driver
|
||||
vulkan-radeon
|
||||
vulkan-intel
|
||||
vulkan-nouveau
|
||||
sddm
|
||||
efibootmgr
|
||||
intel-media-driver
|
||||
amd-ucode
|
||||
intel-ucode
|
||||
sof-firmware
|
||||
base
|
||||
base-devel
|
||||
linux-firmware
|
||||
linux
|
||||
limine
|
||||
pipewire
|
||||
snapper
|
||||
Executable
+23
@@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
# Patch to convert production PKGBUILD to dev PKGBUILD
|
||||
# This script modifies PKGBUILD to use local source instead of git clone
|
||||
|
||||
convert_to_dev_pkgbuild() {
|
||||
local pkgbuild_path="$1"
|
||||
local dev_pkgbuild_path="${pkgbuild_path}.dev"
|
||||
|
||||
echo "Creating dev PKGBUILD from production version..."
|
||||
|
||||
# Copy production PKGBUILD
|
||||
cp "$pkgbuild_path" "$dev_pkgbuild_path"
|
||||
|
||||
# Remove git source (replace with empty source array)
|
||||
sed -i '/^source=/c\source=()' "$dev_pkgbuild_path"
|
||||
sed -i '/^sha256sums=/c\sha256sums=()' "$dev_pkgbuild_path"
|
||||
|
||||
# Replace cd "omarchy-installer" with cd "/omarchy-installer" to use mounted directory directly
|
||||
sed -i 's|cd "omarchy-installer"|cd "/omarchy-installer"|g' "$dev_pkgbuild_path"
|
||||
|
||||
echo "✓ Dev PKGBUILD created: $dev_pkgbuild_path"
|
||||
echo "✓ Will use /omarchy-installer directly (no git clone, no symlinks)"
|
||||
}
|
||||
@@ -1,2 +1,2 @@
|
||||
# Configuration for archiso with Plymouth
|
||||
HOOKS=(base udev plymouth modconf archiso archiso_loop_mnt archiso_pxe_common archiso_pxe_nbd archiso_pxe_http archiso_pxe_nfs archiso_kms block filesystems keyboard)
|
||||
HOOKS=(base udev microcode modconf kms memdisk archiso archiso_loop_mnt archiso_pxe_common archiso_pxe_nbd archiso_pxe_http archiso_pxe_nfs plymouth block filesystems keyboard)
|
||||
@@ -0,0 +1,9 @@
|
||||
# mkinitcpio preset file for the 'linux' package on archiso
|
||||
|
||||
PRESETS=('archiso')
|
||||
|
||||
ALL_kver='/boot/vmlinuz-linux-t2'
|
||||
archiso_config='/etc/mkinitcpio.conf.d/archiso.conf'
|
||||
|
||||
archiso_image="/boot/initramfs-linux-t2.img"
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
[Daemon]
|
||||
Theme=omarchy
|
||||
ShowDelay=0
|
||||
ShowDelay=0
|
||||
Regular → Executable
+148
-121
@@ -1,6 +1,152 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
use_omarchy_helpers() {
|
||||
# Use omarchy-settings package location (installed in ISO)
|
||||
export OMARCHY_PATH="/usr/share/omarchy"
|
||||
export OMARCHY_INSTALL="/usr/share/omarchy/install"
|
||||
export OMARCHY_INSTALL_LOG_FILE="/var/log/archinstall/install.log"
|
||||
|
||||
# Load presentation helpers (clear_logo, etc.) and logging helpers (start_log_output, etc.)
|
||||
source /usr/share/omarchy/install/helpers/all.sh
|
||||
}
|
||||
|
||||
run_configurator() {
|
||||
set_tokyo_night_colors
|
||||
./configurator
|
||||
export OMARCHY_USER="$(jq -r '.username' user_info.json)"
|
||||
export OMARCHY_USER_PASSWORD_HASH="$(jq -r '.password_hash' user_info.json)"
|
||||
export OMARCHY_USER_NAME="$(cat user_full_name.txt)"
|
||||
export OMARCHY_USER_EMAIL="$(cat user_email_address.txt)"
|
||||
}
|
||||
|
||||
install_omarchy() {
|
||||
clear_logo
|
||||
gum style --foreground 3 --padding "1 0 0 $PADDING_LEFT" "Installing..."
|
||||
echo
|
||||
|
||||
# Copy user info to /tmp on the ISO side
|
||||
# omarchy-install will copy these into the chroot at the right time
|
||||
cp user_full_name.txt /tmp/omarchy-user-name.txt 2>/dev/null || true
|
||||
cp user_email_address.txt /tmp/omarchy-user-email.txt 2>/dev/null || true
|
||||
|
||||
# Check if advanced disk mode (partition TUI)
|
||||
EDIT_PARTITIONS_FLAG=""
|
||||
if [[ -f edit_partitions_flag.txt ]]; then
|
||||
EDIT_PARTITIONS_FLAG=$(cat edit_partitions_flag.txt | tr -d '\n' | xargs)
|
||||
fi
|
||||
|
||||
# ADVANCED MODE: Run disk configuration TUI before installation
|
||||
if [[ -n "$EDIT_PARTITIONS_FLAG" ]]; then
|
||||
clear_logo
|
||||
gum style --foreground 3 --padding "1 0 0 $PADDING_LEFT" "Configuring disk layout..."
|
||||
echo
|
||||
|
||||
# Run omarchy-disk-config to show partition TUI and validate
|
||||
# This updates user_configuration.json in place
|
||||
/usr/share/omarchy/bin/omarchy-disk-config \
|
||||
--config user_configuration.json \
|
||||
--creds user_credentials.json
|
||||
|
||||
disk_config_exit_code=$?
|
||||
|
||||
if [[ $disk_config_exit_code -ne 0 ]]; then
|
||||
echo "ERROR: Disk configuration failed or was cancelled"
|
||||
exit $disk_config_exit_code
|
||||
fi
|
||||
|
||||
clear_logo
|
||||
gum style --foreground 3 --padding "1 0 0 $PADDING_LEFT" "Disk configuration complete!"
|
||||
echo
|
||||
sleep 1
|
||||
fi
|
||||
|
||||
# Run installation with the configuration (possibly updated by disk-config)
|
||||
|
||||
# Create backup log file for raw output (with ANSI codes stripped)
|
||||
touch /var/log/omarchy-install.log
|
||||
|
||||
# Ensure archinstall log directory exists
|
||||
sudo mkdir -p /var/log/archinstall
|
||||
|
||||
# Prepare chroot log location (will be created by chroot script when it runs)
|
||||
sudo mkdir -p /mnt/var/log
|
||||
CHROOT_LOG="/mnt/var/log/omarchy-install-chroot.log"
|
||||
|
||||
# Start tailing BOTH logs with tail -F (follows multiple files, waits for files to appear)
|
||||
# This will automatically pick up the chroot log when it's created
|
||||
start_log_output "/var/log/omarchy-install.log" "$CHROOT_LOG"
|
||||
|
||||
# Run omarchy-install and capture output
|
||||
# archinstall writes to /var/log/archinstall/install.log internally
|
||||
# We also capture stdout/stderr to our backup log (stripping ANSI codes for clean viewing)
|
||||
/usr/share/omarchy/bin/omarchy-install \
|
||||
--config user_configuration.json \
|
||||
--creds user_credentials.json \
|
||||
2>&1 | sed -u 's/\x1b\[[0-9;]*[a-zA-Z]//g' | tee -a /var/log/omarchy-install.log >/dev/null
|
||||
|
||||
install_exit_code=$?
|
||||
|
||||
# Check if omarchy-install failed
|
||||
if [[ $install_exit_code -ne 0 ]]; then
|
||||
stop_log_output
|
||||
echo
|
||||
echo "ERROR: Installation failed (exit code $install_exit_code)"
|
||||
echo "Check /var/log/omarchy-install.log and /mnt/var/log/omarchy-install-chroot.log for details"
|
||||
exit $install_exit_code
|
||||
fi
|
||||
|
||||
# Installation succeeded - stop log output BEFORE doing anything else
|
||||
stop_log_output
|
||||
|
||||
# Copy and merge logs to installed system for user access (silent)
|
||||
{
|
||||
sudo cp /var/log/omarchy-install.log /mnt/var/log/omarchy-install.log 2>/dev/null || true
|
||||
sudo cp /var/log/archinstall/install.log /mnt/var/log/archinstall-install.log 2>/dev/null || true
|
||||
|
||||
# Create a merged log with all phases
|
||||
{
|
||||
echo "========================================"
|
||||
echo "Omarchy Installation - Complete Log"
|
||||
echo "Generated: $(date '+%Y-%m-%d %H:%M:%S')"
|
||||
echo "========================================"
|
||||
echo
|
||||
echo "=== Phase 1: Main Installation (ISO) ==="
|
||||
cat /var/log/omarchy-install.log 2>/dev/null || echo "(No main install log found)"
|
||||
echo
|
||||
echo "=== Phase 2: Chroot Configuration ==="
|
||||
cat "$CHROOT_LOG" 2>/dev/null || echo "(No chroot log found)"
|
||||
echo
|
||||
echo "========================================"
|
||||
echo "Installation Complete"
|
||||
echo "========================================"
|
||||
} | sudo tee /mnt/var/log/omarchy-install-full.log >/dev/null
|
||||
} >/dev/null 2>&1
|
||||
|
||||
# Show completion screen
|
||||
clear
|
||||
echo
|
||||
tte -i /usr/share/omarchy/logo.txt --canvas-width 0 --anchor-text c --frame-rate 920 laseretch
|
||||
echo
|
||||
|
||||
# Display installation time if available
|
||||
if [[ -f /mnt/tmp/omarchy-install-time.txt ]]; then
|
||||
TOTAL_TIME=$(cat /mnt/tmp/omarchy-install-time.txt)
|
||||
echo "Installed in $TOTAL_TIME" | tte --canvas-width 0 --anchor-text c --frame-rate 640 print
|
||||
else
|
||||
echo "Finished installing" | tte --canvas-width 0 --anchor-text c --frame-rate 640 print
|
||||
fi
|
||||
echo
|
||||
|
||||
# Prompt for reboot (centered)
|
||||
BUTTON_WIDTH=12 # "Reboot Now" + padding
|
||||
BUTTON_PADDING=$(( (TERM_WIDTH - BUTTON_WIDTH) / 2 ))
|
||||
if gum confirm --padding "0 0 0 $BUTTON_PADDING" --show-help=false --default --affirmative "Reboot Now" --negative "" ""; then
|
||||
clear
|
||||
reboot
|
||||
fi
|
||||
}
|
||||
|
||||
# Set Tokyo Night color scheme for the terminal
|
||||
set_tokyo_night_colors() {
|
||||
if [[ $(tty) == "/dev/tty"* ]]; then
|
||||
@@ -28,127 +174,8 @@ set_tokyo_night_colors() {
|
||||
fi
|
||||
}
|
||||
|
||||
run_configurator() {
|
||||
set -euo pipefail
|
||||
|
||||
# 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)"
|
||||
}
|
||||
|
||||
install_base_system() {
|
||||
set -euo pipefail
|
||||
|
||||
# Initialize and populate the keyring
|
||||
pacman-key --init
|
||||
pacman-key --populate archlinux
|
||||
|
||||
# Sync the offline database so pacman can find packages
|
||||
pacman -Sy --noconfirm
|
||||
|
||||
# Ensure that no mounts exist from past install attempts
|
||||
findmnt -R /mnt >/dev/null && umount -R /mnt
|
||||
|
||||
# Install using files generated by the ./configurator
|
||||
# Skip NTP and WKD sync since we're offline (keyring is pre-populated in ISO)
|
||||
archinstall \
|
||||
--config user_configuration.json \
|
||||
--creds user_credentials.json \
|
||||
--silent \
|
||||
--skip-ntp \
|
||||
--skip-wkd
|
||||
|
||||
# After archinstall sets up the base system but before our installer runs,
|
||||
# we need to ensure the offline pacman.conf is in place
|
||||
cp /etc/pacman.conf /mnt/etc/pacman.conf
|
||||
|
||||
# Mount the offline mirror so it's accessible in the chroot
|
||||
mkdir -p /mnt/var/cache/omarchy/mirror/offline
|
||||
mount --bind /var/cache/omarchy/mirror/offline /mnt/var/cache/omarchy/mirror/offline
|
||||
|
||||
# Mount the ruby directory so it's accessible in the chroot
|
||||
mkdir -p /mnt/var/cache/omarchy/ruby
|
||||
mount --bind /var/cache/omarchy/ruby /mnt/var/cache/omarchy/ruby
|
||||
|
||||
# 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 <<EOF
|
||||
root ALL=(ALL:ALL) NOPASSWD: ALL
|
||||
%wheel ALL=(ALL:ALL) NOPASSWD: ALL
|
||||
$OMARCHY_USER ALL=(ALL:ALL) NOPASSWD: ALL
|
||||
EOF
|
||||
chmod 440 /mnt/etc/sudoers.d/99-omarchy-installer
|
||||
|
||||
# Copy the local omarchy repo to the user's home directory
|
||||
mkdir -p /mnt/home/$OMARCHY_USER/.local/share/
|
||||
cp -r /root/omarchy /mnt/home/$OMARCHY_USER/.local/share/
|
||||
|
||||
chown -R 1000:1000 /mnt/home/$OMARCHY_USER/.local/
|
||||
# Ensure all scripts in bin directories are executable
|
||||
find /mnt/home/$OMARCHY_USER/.local/share/omarchy -type f -path "*/bin/*" -exec chmod +x {} \;
|
||||
# Ensure boot.sh is executable
|
||||
chmod +x /mnt/home/$OMARCHY_USER/.local/share/omarchy/boot.sh 2>/dev/null || true
|
||||
}
|
||||
|
||||
chroot_bash() {
|
||||
HOME=/home/$OMARCHY_USER \
|
||||
arch-chroot -u $OMARCHY_USER /mnt/ \
|
||||
env OMARCHY_CHROOT_INSTALL=1 \
|
||||
OMARCHY_INSTALL_MODE="${OMARCHY_INSTALL_MODE:-offline}" \
|
||||
OMARCHY_USER_NAME="$(<user_full_name.txt)" \
|
||||
OMARCHY_USER_EMAIL="$(<user_email_address.txt)" \
|
||||
USER="$OMARCHY_USER" \
|
||||
HOME="/home/$OMARCHY_USER" \
|
||||
OMARCHY_REPO="$(<omarchy_installer_repo.txt)" \
|
||||
OMARCHY_REF="$(<omarchy_installer_ref.txt)" \
|
||||
/bin/bash "$@"
|
||||
}
|
||||
|
||||
if [[ $(tty) == "/dev/tty1" ]]; then
|
||||
# Set log file to pull from in trap
|
||||
export OMARCHY_INSTALL_LOG_FILE="/var/log/omarchy-install.log"
|
||||
export OMARCHY_PATH="/root/omarchy"
|
||||
export OMARCHY_INSTALL="/root/omarchy/install"
|
||||
|
||||
# Set install mode based on build mode file, default to offline
|
||||
if [ -f /root/omarchy_install_mode.txt ]; then
|
||||
export OMARCHY_INSTALL_MODE="$(cat /root/omarchy_install_mode.txt)"
|
||||
else
|
||||
export OMARCHY_INSTALL_MODE="offline"
|
||||
fi
|
||||
|
||||
source "$OMARCHY_INSTALL/preflight/set-size-vars.sh"
|
||||
source "$OMARCHY_INSTALL/helpers/logo.sh"
|
||||
source "$OMARCHY_INSTALL/preflight/gum.sh"
|
||||
source "$OMARCHY_INSTALL/helpers/tail-log-output.sh"
|
||||
source "$OMARCHY_INSTALL/helpers/trap-errors.sh"
|
||||
|
||||
set_tokyo_night_colors
|
||||
|
||||
use_omarchy_helpers
|
||||
run_configurator
|
||||
|
||||
clear_logo
|
||||
|
||||
gum style --foreground 3 --padding "1 0 0 $PADDING_LEFT" "Installing Omarchy..."
|
||||
|
||||
touch "$OMARCHY_INSTALL_LOG_FILE"
|
||||
|
||||
start_log_output
|
||||
install_base_system 2>&1 | sed -u 's/\x1b\[[0-9;]*[a-zA-Z]//g' >>"$OMARCHY_INSTALL_LOG_FILE"
|
||||
cleanup
|
||||
|
||||
# Get username from the config file after installation
|
||||
OMARCHY_USER="$(jq -r '.users[0].username' user_credentials.json)"
|
||||
|
||||
# Install gum early so we have it for formatting
|
||||
chroot_bash -lc "sudo pacman -S --noconfirm --needed gum" >/dev/null
|
||||
|
||||
# Run Omarchy installer directly (skip boot.sh since it would try to clone again)
|
||||
chroot_bash -lc "source /home/$OMARCHY_USER/.local/share/omarchy/install.sh || bash"
|
||||
install_omarchy
|
||||
fi
|
||||
@@ -0,0 +1,525 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Rely on Omarchy for styling and error handling
|
||||
source "$OMARCHY_INSTALL/helpers/all.sh"
|
||||
|
||||
# Ensure tzupdate is available for guessing timezone
|
||||
command -v tzupdate >/dev/null || sudo pacman -Sy --noconfirm tzupdate
|
||||
|
||||
# Build the package list for archinstall from omarchy-base.packages
|
||||
build_package_json() {
|
||||
local packages=("base-devel" "git" "omarchy-keyring" "omarchy-settings")
|
||||
|
||||
# Read omarchy-base.packages and add to array
|
||||
while IFS= read -r pkg; do
|
||||
[[ -z "$pkg" || "$pkg" =~ ^# ]] && continue
|
||||
packages+=("$pkg")
|
||||
done < "$OMARCHY_INSTALL/omarchy-base.packages"
|
||||
|
||||
# Format as JSON array
|
||||
local json="["
|
||||
for i in "${!packages[@]}"; do
|
||||
json+="\"${packages[$i]}\""
|
||||
[[ $i -lt $((${#packages[@]} - 1)) ]] && json+=", "
|
||||
done
|
||||
json+="]"
|
||||
|
||||
echo "$json"
|
||||
}
|
||||
|
||||
abort() {
|
||||
gum style "${1:-Aborted installation}"
|
||||
echo
|
||||
gum style "You can retry later by running: ./.automated_script.sh"
|
||||
exit 1
|
||||
}
|
||||
|
||||
step() {
|
||||
clear_logo
|
||||
echo
|
||||
gum style "$1"
|
||||
echo
|
||||
}
|
||||
|
||||
notice() {
|
||||
clear_logo
|
||||
echo
|
||||
gum spin --spinner "pulse" --title "$1" -- sleep "${2:-2}"
|
||||
echo
|
||||
}
|
||||
|
||||
# STEP 1: KEYBOARD LAYOUT
|
||||
|
||||
keyboard_form() {
|
||||
step "Let's setup your machine..."
|
||||
keyboards=$'Azerbaijani|azerty
|
||||
Belarusian|by
|
||||
Belgian|be-latin1
|
||||
Bosnian|ba
|
||||
Bulgarian|bg-cp1251
|
||||
Croatian|croat
|
||||
Czech|cz
|
||||
Danish|dk-latin1
|
||||
Dutch|nl
|
||||
English (UK)|uk
|
||||
English (US)|us
|
||||
English (US, Dvorak)|dvorak
|
||||
Estonian|et
|
||||
Finnish|fi
|
||||
French|fr
|
||||
French (Canada)|cf
|
||||
French (Switzerland)|fr_CH
|
||||
Georgian|ge
|
||||
German|de
|
||||
German (Switzerland)|de_CH-latin1
|
||||
Greek|gr
|
||||
Hebrew|il
|
||||
Hungarian|hu
|
||||
Icelandic|is-latin1
|
||||
Irish|ie
|
||||
Italian|it
|
||||
Japanese|jp106
|
||||
Kazakh|kazakh
|
||||
Khmer (Cambodia)|khmer
|
||||
Kyrgyz|kyrgyz
|
||||
Lao|la-latin1
|
||||
Latvian|lv
|
||||
Lithuanian|lt
|
||||
Macedonian|mk-utf
|
||||
Norwegian|no-latin1
|
||||
Polish|pl
|
||||
Portuguese|pt-latin1
|
||||
Portuguese (Brazil)|br-abnt2
|
||||
Romanian|ro
|
||||
Russian|ru
|
||||
Serbian|sr-latin
|
||||
Slovak|sk-qwertz
|
||||
Slovenian|slovene
|
||||
Spanish|es
|
||||
Spanish (Latin American)|la-latin1
|
||||
Swedish|sv-latin1
|
||||
Tajik|tj_alt-UTF8
|
||||
Turkish|trq
|
||||
Ukrainian|ua'
|
||||
choice=$(printf '%s\n' "$keyboards" | cut -d'|' -f1 | gum choose --height 10 --selected "English (US)" --header "Select keyboard layout") || abort
|
||||
keyboard=$(printf '%s\n' "$keyboards" | awk -F'|' -v c="$choice" '$1==c{print $2; exit}')
|
||||
|
||||
# Only attempt to load keyboard layout if we're on a real console
|
||||
# loadkeys only works on Linux virtual consoles (tty), not in terminal emulators
|
||||
if [[ $(tty 2>/dev/null) == "/dev/tty"* ]]; then
|
||||
loadkeys "$keyboard" 2>/dev/null
|
||||
fi
|
||||
}
|
||||
|
||||
keyboard_form
|
||||
|
||||
# STEP 2: USER
|
||||
|
||||
user_form() {
|
||||
step "Let's setup your user account..."
|
||||
|
||||
while true; do
|
||||
username=$(gum input --placeholder "Alphanumeric without spaces (like dhh)" --prompt.foreground="#845DF9" --prompt "Username> ") || abort
|
||||
|
||||
if [[ "$username" =~ ^[a-z_][a-z0-9_-]*[$]?$ ]]; then
|
||||
break
|
||||
else
|
||||
notice "Username must be alphanumeric with no spaces" 1
|
||||
fi
|
||||
done
|
||||
|
||||
while true; do
|
||||
password=$(gum input --placeholder "Used for user + root + encryption" --prompt.foreground="#845DF9" --password --prompt "Password> ") || abort
|
||||
password_confirmation=$(gum input --placeholder "Must match the password you just typed" --prompt.foreground="#845DF9" --password --prompt "Confirm> ") || abort
|
||||
|
||||
if [[ -n "$password" && "$password" == "$password_confirmation" ]]; then
|
||||
break
|
||||
elif [[ -z "$password" ]]; then
|
||||
notice "Your password can't be blank!" 1
|
||||
else
|
||||
notice "Passwords didn't match!" 1
|
||||
fi
|
||||
done
|
||||
|
||||
# Hash the password using yescrypt
|
||||
password_hash=$(printf '%s' "$password" | openssl passwd -6 -stdin)
|
||||
|
||||
full_name=$(gum input --placeholder "Used for git authentication (hit return to skip)" --prompt.foreground="#845DF9" --prompt "Full name> ")
|
||||
email_address=$(gum input --placeholder "Used for git authentication (hit return to skip)" --prompt.foreground="#845DF9" --prompt "Email address> ")
|
||||
|
||||
while true; do
|
||||
hostname=$(gum input --placeholder "Alphanumeric without spaces (or return for 'omarchy')" --prompt.foreground="#845DF9" --prompt "Hostname> ")
|
||||
|
||||
if [[ "$hostname" =~ ^[A-Za-z_][A-Za-z0-9_-]*\$?$ ]]; then
|
||||
break
|
||||
elif [[ -z $hostname ]]; then
|
||||
hostname="omarchy"
|
||||
break
|
||||
else
|
||||
notice "Hostname must be alphanumeric using dashes or underscores but no spaces" 1
|
||||
fi
|
||||
done
|
||||
|
||||
# Pick timezone
|
||||
geo_guessed_timezone=$(tzupdate -p 2>/dev/null)
|
||||
|
||||
if [[ -n $geo_guessed_timezone ]]; then
|
||||
timezone=$(timedatectl list-timezones | gum choose --height 10 --selected "$geo_guessed_timezone" --header "Timezone") || abort
|
||||
else
|
||||
timezone=$(timedatectl list-timezones | gum filter --height 10 --header "Timezone") || abort
|
||||
fi
|
||||
}
|
||||
|
||||
user_form
|
||||
|
||||
while true; do
|
||||
# Add manual padding since gum table -p doesn't respect padding
|
||||
echo -e "Field,Value
|
||||
Username,$username
|
||||
Password,$(printf "%${#password}s" | tr ' ' '*')
|
||||
Full name,${full_name:-[Skipped]}
|
||||
Email address,${email_address:-[Skipped]}
|
||||
Hostname,$hostname
|
||||
Timezone,$timezone
|
||||
Keyboard,$keyboard" |
|
||||
gum table -s "," -p | sed "s/^/${PADDING_LEFT_SPACES}/"
|
||||
|
||||
echo
|
||||
if gum confirm --negative "No, change it" "Does this look right?"; then
|
||||
break
|
||||
else
|
||||
keyboard_form
|
||||
user_form
|
||||
fi
|
||||
done
|
||||
|
||||
# STEP 3: DISK
|
||||
|
||||
get_disk_info() {
|
||||
local device="$1"
|
||||
local size model
|
||||
|
||||
# Get basic disk information
|
||||
size=$(lsblk -dno SIZE "$device" 2>/dev/null)
|
||||
model=$(lsblk -dno MODEL "$device" 2>/dev/null | sed 's/^[[:space:]]*//' | sed 's/[[:space:]]*$//')
|
||||
|
||||
# Format display string
|
||||
local display="$device"
|
||||
[[ -n "$size" ]] && display="$display ($size)"
|
||||
[[ -n "$model" ]] && display="$display - $model"
|
||||
|
||||
echo "$display"
|
||||
}
|
||||
|
||||
disk_form() {
|
||||
step "Let's select where to install Omarchy..."
|
||||
|
||||
# Don't offer the install media as an option (Arch ISO mounts it here)
|
||||
local exclude_disk
|
||||
exclude_disk=$(findmnt -no SOURCE /run/archiso/bootmnt 2>/dev/null || true)
|
||||
|
||||
# List all installable disks, excluding the boot device if present
|
||||
local available_disks
|
||||
available_disks=$(
|
||||
lsblk -dpno NAME,TYPE |
|
||||
awk '$2=="disk"{print $1}' |
|
||||
grep -E '/dev/(sd|hd|vd|nvme|mmcblk|xv)' |
|
||||
{ if [[ -n "$exclude_disk" ]]; then grep -Fvx "$exclude_disk"; else cat; fi; }
|
||||
)
|
||||
|
||||
# Get available disks and format them with info
|
||||
local disk_options=""
|
||||
while IFS= read -r device; do
|
||||
if [[ -n "$device" ]]; then
|
||||
disk_info=$(get_disk_info "$device")
|
||||
disk_options="$disk_options$disk_info"$'\n'
|
||||
fi
|
||||
done <<<"$available_disks"
|
||||
|
||||
# Add "Advanced Disk Config" option at the bottom
|
||||
disk_options="${disk_options}Advanced Disk Config (custom partitioning)"
|
||||
|
||||
selected_display=$(echo "$disk_options" | gum choose --header "Select install disk") || abort
|
||||
|
||||
# Check if user selected advanced config
|
||||
if echo "$selected_display" | grep -q "Advanced Disk Config"; then
|
||||
USE_ADVANCED_DISK_CONFIG=1
|
||||
EDIT_PARTITIONS="--edit-partitions"
|
||||
disk="" # Will be determined by TUI
|
||||
else
|
||||
USE_ADVANCED_DISK_CONFIG=0
|
||||
disk=$(echo "$selected_display" | awk '{print $1}')
|
||||
fi
|
||||
}
|
||||
|
||||
disk_form
|
||||
|
||||
# If user selected advanced config, skip to partition editor
|
||||
if [[ $USE_ADVANCED_DISK_CONFIG -eq 1 ]]; then
|
||||
gum style --foreground 3 "Advanced disk configuration selected."
|
||||
gum style "You'll configure partitions in the archinstall TUI."
|
||||
echo
|
||||
EDIT_PARTITIONS="--edit-partitions"
|
||||
else
|
||||
# Normal flow: confirm disk wipe and use default layout
|
||||
while true; do
|
||||
gum style "Everything will be overwritten. There is no recovery possible."
|
||||
|
||||
echo
|
||||
if gum confirm --affirmative "Yes, format disk" --negative "No, change it" "Confirm overwriting ${disk}"; then
|
||||
break
|
||||
else
|
||||
disk_form
|
||||
# Check again if user switched to advanced config
|
||||
if [[ $USE_ADVANCED_DISK_CONFIG -eq 1 ]]; then
|
||||
gum style --foreground 3 "Advanced disk configuration selected."
|
||||
gum style "You'll configure partitions in the archinstall TUI."
|
||||
echo
|
||||
EDIT_PARTITIONS="--edit-partitions"
|
||||
break
|
||||
fi
|
||||
fi
|
||||
done
|
||||
# Normal flow always uses default layout (no editing)
|
||||
EDIT_PARTITIONS=""
|
||||
fi
|
||||
|
||||
clear
|
||||
|
||||
# Save user full name and email address, so the autostart can
|
||||
# set them as OMARCHY_USER_NAME and OMARCHY_USER_EMAIL
|
||||
echo "$full_name" >user_full_name.txt
|
||||
echo "$email_address" >user_email_address.txt
|
||||
|
||||
# Save partition editing preference
|
||||
echo "$EDIT_PARTITIONS" >edit_partitions_flag.txt
|
||||
|
||||
# Escape username and password for safe inclusion
|
||||
password_escaped=$(echo -n "$password" | jq -Rsa)
|
||||
password_hash_escaped=$(echo -n "$password_hash" | jq -Rsa)
|
||||
username_escaped=$(echo -n "$username" | jq -Rsa)
|
||||
|
||||
cat <<-_EOF_ >user_credentials.json
|
||||
{
|
||||
"encryption_password": $password_escaped,
|
||||
"root_enc_password": $password_hash_escaped,
|
||||
"users": [
|
||||
{
|
||||
"username": $username_escaped,
|
||||
"enc_password": $password_hash_escaped,
|
||||
"sudo": true
|
||||
}
|
||||
]
|
||||
}
|
||||
_EOF_
|
||||
|
||||
# Save user info separately so we can create the user after packages are installed
|
||||
cat <<-_EOF_ >user_info.json
|
||||
{
|
||||
"username": $username_escaped,
|
||||
"password_hash": $password_hash_escaped
|
||||
}
|
||||
_EOF_
|
||||
|
||||
# Setup partition layout (only for non-advanced config)
|
||||
if [[ $USE_ADVANCED_DISK_CONFIG -eq 0 ]]; then
|
||||
disk_size=$(lsblk -bdno SIZE "$disk")
|
||||
mib=$((1024 * 1024))
|
||||
gib=$((mib * 1024))
|
||||
disk_size_in_mib=$((disk_size / mib * mib)) # Rounds to nearest MiB
|
||||
|
||||
gpt_backup_reserve=$((mib))
|
||||
boot_partition_start=$((mib))
|
||||
boot_partition_size=$((2 * gib))
|
||||
|
||||
main_partition_start=$((boot_partition_size + boot_partition_start))
|
||||
main_partition_size=$((disk_size_in_mib - main_partition_start - gpt_backup_reserve))
|
||||
fi
|
||||
|
||||
# Detect T2 Mac and set appropriate kernel
|
||||
if lspci -nn 2>/dev/null | grep -q "106b:180[12]"; then
|
||||
kernel_choice="linux-t2"
|
||||
else
|
||||
kernel_choice="linux"
|
||||
fi
|
||||
|
||||
# Build the complete package list including all Omarchy packages
|
||||
packages_json=$(build_package_json)
|
||||
|
||||
# Generate configuration based on mode
|
||||
if [[ $USE_ADVANCED_DISK_CONFIG -eq 1 ]]; then
|
||||
# Minimal config for advanced mode - user will configure disk in TUI
|
||||
cat <<-_EOF_ >user_configuration.json
|
||||
{
|
||||
"app_config": null,
|
||||
"archinstall-language": "English",
|
||||
"auth_config": {},
|
||||
"audio_config": { "audio": "pipewire" },
|
||||
"bootloader": "Limine",
|
||||
"custom_commands": [
|
||||
"/usr/share/omarchy/bin/omarchy-install-final-configurations.sh"
|
||||
],
|
||||
"hostname": "$hostname",
|
||||
"kernels": [ "$kernel_choice" ],
|
||||
"network_config": { "type": "iso" },
|
||||
"ntp": true,
|
||||
"parallel_downloads": 8,
|
||||
"script": null,
|
||||
"services": [],
|
||||
"swap": true,
|
||||
"timezone": "$timezone",
|
||||
"locale_config": {
|
||||
"kb_layout": "$keyboard",
|
||||
"sys_enc": "UTF-8",
|
||||
"sys_lang": "en_US.UTF-8"
|
||||
},
|
||||
"mirror_config": {
|
||||
"custom_repositories": [],
|
||||
"custom_servers": [
|
||||
{"url": "https://mirror.omarchy.org/\$repo/os/\$arch"},
|
||||
{"url": "https://mirror.rackspace.com/archlinux/\$repo/os/\$arch"},
|
||||
{"url": "https://geo.mirror.pkgbuild.com/\$repo/os/\$arch"}
|
||||
],
|
||||
"mirror_regions": {},
|
||||
"optional_repositories": []
|
||||
},
|
||||
"packages": $packages_json,
|
||||
"profile_config": {
|
||||
"gfx_driver": null,
|
||||
"greeter": null,
|
||||
"profile": {}
|
||||
},
|
||||
"version": "3.0.9"
|
||||
}
|
||||
_EOF_
|
||||
else
|
||||
# Full config with default partition layout
|
||||
cat <<-_EOF_ >user_configuration.json
|
||||
{
|
||||
"app_config": null,
|
||||
"archinstall-language": "English",
|
||||
"auth_config": {},
|
||||
"audio_config": { "audio": "pipewire" },
|
||||
"bootloader": "Limine",
|
||||
"custom_commands": [
|
||||
"/usr/share/omarchy/bin/omarchy-install-final-configurations.sh"
|
||||
],
|
||||
"disk_config": {
|
||||
"btrfs_options": {
|
||||
"snapshot_config": {
|
||||
"type": "Snapper"
|
||||
}
|
||||
},
|
||||
"config_type": "default_layout",
|
||||
"device_modifications": [
|
||||
{
|
||||
"device": "$disk",
|
||||
"partitions": [
|
||||
{
|
||||
"btrfs": [],
|
||||
"dev_path": null,
|
||||
"flags": [ "boot", "esp" ],
|
||||
"fs_type": "fat32",
|
||||
"mount_options": [],
|
||||
"mountpoint": "/boot",
|
||||
"obj_id": "ea21d3f2-82bb-49cc-ab5d-6f81ae94e18d",
|
||||
"size": {
|
||||
"sector_size": { "unit": "B", "value": 512 },
|
||||
"unit": "B",
|
||||
"value": $boot_partition_size
|
||||
},
|
||||
"start": {
|
||||
"sector_size": { "unit": "B", "value": 512 },
|
||||
"unit": "B",
|
||||
"value": $boot_partition_start
|
||||
},
|
||||
"status": "create",
|
||||
"type": "primary"
|
||||
},
|
||||
{
|
||||
"btrfs": [
|
||||
{ "mountpoint": "/", "name": "@" },
|
||||
{ "mountpoint": "/home", "name": "@home" },
|
||||
{ "mountpoint": "/var/log", "name": "@log" },
|
||||
{ "mountpoint": "/var/cache/pacman/pkg", "name": "@pkg" }
|
||||
],
|
||||
"dev_path": null,
|
||||
"flags": [],
|
||||
"fs_type": "btrfs",
|
||||
"mount_options": [ "compress=zstd" ],
|
||||
"mountpoint": null,
|
||||
"obj_id": "8c2c2b92-1070-455d-b76a-56263bab24aa",
|
||||
"size": {
|
||||
"sector_size": { "unit": "B", "value": 512 },
|
||||
"unit": "B",
|
||||
"value": $main_partition_size
|
||||
},
|
||||
"start": {
|
||||
"sector_size": { "unit": "B", "value": 512 },
|
||||
"unit": "B",
|
||||
"value": $main_partition_start
|
||||
},
|
||||
"status": "create",
|
||||
"type": "primary"
|
||||
}
|
||||
],
|
||||
"wipe": true
|
||||
}
|
||||
],
|
||||
"disk_encryption": {
|
||||
"encryption_type": "luks",
|
||||
"lvm_volumes": [],
|
||||
"iter_time": 2000,
|
||||
"partitions": [ "8c2c2b92-1070-455d-b76a-56263bab24aa" ]
|
||||
}
|
||||
},
|
||||
"hostname": "$hostname",
|
||||
"kernels": [ "$kernel_choice" ],
|
||||
"network_config": { "type": "iso" },
|
||||
"ntp": true,
|
||||
"parallel_downloads": 8,
|
||||
"script": null,
|
||||
"services": [],
|
||||
"swap": true,
|
||||
"timezone": "$timezone",
|
||||
"locale_config": {
|
||||
"kb_layout": "$keyboard",
|
||||
"sys_enc": "UTF-8",
|
||||
"sys_lang": "en_US.UTF-8"
|
||||
},
|
||||
"mirror_config": {
|
||||
"custom_repositories": [],
|
||||
"custom_servers": [
|
||||
{"url": "https://mirror.omarchy.org/\$repo/os/\$arch"},
|
||||
{"url": "https://mirror.rackspace.com/archlinux/\$repo/os/\$arch"},
|
||||
{"url": "https://geo.mirror.pkgbuild.com/\$repo/os/\$arch"}
|
||||
],
|
||||
"mirror_regions": {},
|
||||
"optional_repositories": []
|
||||
},
|
||||
"packages": $packages_json,
|
||||
"profile_config": {
|
||||
"gfx_driver": null,
|
||||
"greeter": null,
|
||||
"profile": {}
|
||||
},
|
||||
"version": "3.0.9"
|
||||
}
|
||||
_EOF_
|
||||
fi
|
||||
|
||||
if [[ $1 == "dry" ]]; then
|
||||
echo -e "User Configuration:"
|
||||
cat user_configuration.json
|
||||
|
||||
echo -e "\n\nUser Credentials:"
|
||||
cat user_credentials.json
|
||||
|
||||
echo -e "\n\nUser Full Name:"
|
||||
cat user_full_name.txt
|
||||
|
||||
echo -e "\nUser Email Address:"
|
||||
cat user_email_address.txt
|
||||
|
||||
rm user_configuration.json user_credentials.json user_full_name.txt user_email_address.txt
|
||||
fi
|
||||
@@ -1,5 +1,5 @@
|
||||
title Arch Linux install medium (x86_64, UEFI)
|
||||
title Omarchy (x86_64, UEFI)
|
||||
sort-key 01
|
||||
linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux
|
||||
initrd /%INSTALL_DIR%/boot/x86_64/initramfs-linux.img
|
||||
options archisobasedir=%INSTALL_DIR% archisosearchuuid=%ARCHISO_UUID% quiet splash
|
||||
linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux-t2
|
||||
initrd /%INSTALL_DIR%/boot/x86_64/initramfs-linux-t2.img
|
||||
options archisobasedir=%INSTALL_DIR% archisosearchuuid=%ARCHISO_UUID% quiet splash
|
||||
@@ -9,11 +9,12 @@ insmod exfat
|
||||
insmod udf
|
||||
|
||||
# Use graphics-mode output
|
||||
insmod font
|
||||
if loadfont "${prefix}/fonts/unicode.pf2" ; then
|
||||
insmod all_video
|
||||
set gfxmode="auto"
|
||||
terminal_input console
|
||||
terminal_output console
|
||||
terminal_output gfxterm
|
||||
fi
|
||||
|
||||
# Enable serial console
|
||||
@@ -51,16 +52,16 @@ timeout_style=hidden
|
||||
|
||||
# Menu entries
|
||||
|
||||
menuentry "Arch Linux install medium (%ARCH%, ${archiso_platform})" --class arch --class gnu-linux --class gnu --class os --id 'archlinux' {
|
||||
menuentry "Omarchy (%ARCH%, ${archiso_platform})" --class arch --class gnu-linux --class gnu --class os --id 'archlinux' {
|
||||
set gfxpayload=keep
|
||||
linux /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux archisobasedir=%INSTALL_DIR% archisosearchuuid=%ARCHISO_UUID% quiet splash
|
||||
initrd /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux.img
|
||||
linux /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux-t2 archisobasedir=%INSTALL_DIR% archisosearchuuid=%ARCHISO_UUID% quiet splash
|
||||
initrd /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux-t2.img
|
||||
}
|
||||
|
||||
menuentry "Arch Linux install medium with speakup screen reader (%ARCH%, ${archiso_platform})" --hotkey s --class arch --class gnu-linux --class gnu --class os --id 'archlinux-accessibility' {
|
||||
menuentry "Omarchy with speakup screen reader (%ARCH%, ${archiso_platform})" --hotkey s --class arch --class gnu-linux --class gnu --class os --id 'archlinux-accessibility' {
|
||||
set gfxpayload=keep
|
||||
linux /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux archisobasedir=%INSTALL_DIR% archisosearchuuid=%ARCHISO_UUID% accessibility=on
|
||||
initrd /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux.img
|
||||
linux /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux-t2 archisobasedir=%INSTALL_DIR% archisosearchuuid=%ARCHISO_UUID% accessibility=on
|
||||
initrd /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux-t2.img
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
# https://www.supergrubdisk.org/wiki/Loopback.cfg
|
||||
|
||||
# Search for the ISO volume
|
||||
search --no-floppy --set=archiso_img_dev --file "${iso_path}"
|
||||
probe --set archiso_img_dev_uuid --fs-uuid "${archiso_img_dev}"
|
||||
|
||||
# Get a human readable platform identifier
|
||||
if [ "${grub_platform}" == 'efi' ]; then
|
||||
archiso_platform='UEFI'
|
||||
if [ "${grub_cpu}" == 'x86_64' ]; then
|
||||
archiso_platform="x64 ${archiso_platform}"
|
||||
elif [ "${grub_cpu}" == 'i386' ]; then
|
||||
archiso_platform="IA32 ${archiso_platform}"
|
||||
else
|
||||
archiso_platform="${grub_cpu} ${archiso_platform}"
|
||||
fi
|
||||
elif [ "${grub_platform}" == 'pc' ]; then
|
||||
archiso_platform='BIOS'
|
||||
else
|
||||
archiso_platform="${grub_cpu} ${grub_platform}"
|
||||
fi
|
||||
|
||||
# Set default menu entry
|
||||
default=archlinux
|
||||
timeout=0
|
||||
timeout_style=hidden
|
||||
|
||||
|
||||
# Menu entries
|
||||
|
||||
menuentry "Omarchy (%ARCH%, ${archiso_platform})" --class arch --class gnu-linux --class gnu --class os --id 'archlinux' {
|
||||
set gfxpayload=keep
|
||||
linux /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux-t2 archisobasedir=%INSTALL_DIR% img_dev=UUID=${archiso_img_dev_uuid} img_loop="${iso_path}" quiet splash
|
||||
initrd /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux-t2.img
|
||||
}
|
||||
|
||||
menuentry "Omarchy with speakup screen reader (%ARCH%, ${archiso_platform})" --hotkey s --class arch --class gnu-linux --class gnu --class os --id 'archlinux-accessibility' {
|
||||
set gfxpayload=keep
|
||||
linux /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux-t2 archisobasedir=%INSTALL_DIR% img_dev=UUID=${archiso_img_dev_uuid} img_loop="${iso_path}" accessibility=on
|
||||
initrd /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux-t2.img
|
||||
}
|
||||
|
||||
|
||||
if [ "${grub_platform}" == 'efi' -a "${grub_cpu}" == 'x86_64' -a -f '/boot/memtest86+/memtest.efi' ]; then
|
||||
menuentry 'Run Memtest86+ (RAM test)' --class memtest86 --class memtest --class gnu --class tool {
|
||||
set gfxpayload=800x600,1024x768
|
||||
linux /boot/memtest86+/memtest.efi
|
||||
}
|
||||
fi
|
||||
if [ "${grub_platform}" == 'pc' -a -f '/boot/memtest86+/memtest' ]; then
|
||||
menuentry 'Run Memtest86+ (RAM test)' --class memtest86 --class memtest --class gnu --class tool {
|
||||
set gfxpayload=800x600,1024x768
|
||||
linux /boot/memtest86+/memtest
|
||||
}
|
||||
fi
|
||||
if [ "${grub_platform}" == 'efi' ]; then
|
||||
if [ "${grub_cpu}" == 'x86_64' -a -f '/shellx64.efi' ]; then
|
||||
menuentry 'UEFI Shell' --class efi {
|
||||
chainloader /shellx64.efi
|
||||
}
|
||||
elif [ "${grub_cpu}" == "i386" -a -f '/shellia32.efi' ]; then
|
||||
menuentry 'UEFI Shell' --class efi {
|
||||
chainloader /shellia32.efi
|
||||
}
|
||||
fi
|
||||
|
||||
menuentry 'UEFI Firmware Settings' --id 'uefi-firmware' {
|
||||
fwsetup
|
||||
}
|
||||
fi
|
||||
|
||||
menuentry 'System shutdown' --class shutdown --class poweroff {
|
||||
echo 'System shutting down...'
|
||||
halt
|
||||
}
|
||||
|
||||
menuentry 'System restart' --class reboot --class restart {
|
||||
echo 'System rebooting...'
|
||||
reboot
|
||||
}
|
||||
@@ -14,21 +14,15 @@ SigLevel = Required DatabaseOptional
|
||||
LocalFileSigLevel = Optional
|
||||
|
||||
[core]
|
||||
Server = https://mirror.omarchy.org/$repo/os/$arch
|
||||
Server = https://mirror.rackspace.com/archlinux/$repo/os/$arch
|
||||
Server = https://geo.mirror.pkgbuild.com/$repo/os/$arch
|
||||
Server = https://stable-mirror.omarchy.org/$repo/os/$arch
|
||||
Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
[extra]
|
||||
Server = https://mirror.omarchy.org/$repo/os/$arch
|
||||
Server = https://mirror.rackspace.com/archlinux/$repo/os/$arch
|
||||
Server = https://geo.mirror.pkgbuild.com/$repo/os/$arch
|
||||
Server = https://stable-mirror.omarchy.org/$repo/os/$arch
|
||||
Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
[multilib]
|
||||
Server = https://mirror.omarchy.org/$repo/os/$arch
|
||||
Server = https://mirror.rackspace.com/archlinux/$repo/os/$arch
|
||||
Server = https://geo.mirror.pkgbuild.com/$repo/os/$arch
|
||||
Server = https://stable-mirror.omarchy.org/$repo/os/$arch
|
||||
Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
[omarchy]
|
||||
@@ -36,5 +30,5 @@ SigLevel = Optional TrustAll
|
||||
Server = https://pkgs.omarchy.org/$arch
|
||||
|
||||
[arch-mact2]
|
||||
Server = https://mirror.omarchy.org/$repo/$arch
|
||||
Server = https://github.com/NoaHimesaka1873/arch-mact2-mirror/releases/download/release
|
||||
SigLevel = Never
|
||||
@@ -2,15 +2,13 @@
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
iso_name="omarchy"
|
||||
iso_label="ARCH_$(date --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y%m)"
|
||||
iso_label="OMARCHY_$(date --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y%m)"
|
||||
iso_publisher="Omarchy <https://omarchy.org>"
|
||||
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')
|
||||
bootmodes=('bios.syslinux' 'uefi.grub')
|
||||
arch="x86_64"
|
||||
pacman_conf="pacman.conf"
|
||||
airootfs_image_type="squashfs"
|
||||
@@ -24,6 +22,4 @@ file_permissions=(
|
||||
["/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"
|
||||
["/usr/local/bin/omarchy-upload-log"]="0:0:755"
|
||||
)
|
||||
@@ -0,0 +1,28 @@
|
||||
SERIAL 0 115200
|
||||
UI vesamenu.c32
|
||||
MENU TITLE Omarchy
|
||||
MENU BACKGROUND splash.png
|
||||
|
||||
MENU WIDTH 78
|
||||
MENU MARGIN 4
|
||||
MENU ROWS 7
|
||||
MENU VSHIFT 10
|
||||
MENU TABMSGROW 14
|
||||
MENU CMDLINEROW 14
|
||||
MENU HELPMSGROW 16
|
||||
MENU HELPMSGENDROW 29
|
||||
|
||||
# Refer to https://wiki.syslinux.org/wiki/index.php/Comboot/menu.c32
|
||||
|
||||
MENU COLOR border 30;44 #40ffffff #a0000000 std
|
||||
MENU COLOR title 1;36;44 #9033ccff #a0000000 std
|
||||
MENU COLOR sel 7;37;40 #e0ffffff #20ffffff all
|
||||
MENU COLOR unsel 37;44 #50ffffff #a0000000 std
|
||||
MENU COLOR help 37;40 #c0ffffff #a0000000 std
|
||||
MENU COLOR timeout_msg 37;40 #80ffffff #00000000 std
|
||||
MENU COLOR timeout 1;37;40 #c0ffffff #00000000 std
|
||||
MENU COLOR msg07 37;40 #90ffffff #a0000000 std
|
||||
MENU COLOR tabmsg 31;40 #30ffffff #00000000 std
|
||||
|
||||
MENU CLEAR
|
||||
MENU IMMEDIATE
|
||||
@@ -0,0 +1,32 @@
|
||||
LABEL arch64_nbd
|
||||
TEXT HELP
|
||||
Boot the Omarchy install medium using NBD.
|
||||
It allows you to install Omarchy or perform system maintenance.
|
||||
ENDTEXT
|
||||
MENU LABEL Omarchy install medium (x86_64, NBD)
|
||||
LINUX ::/%INSTALL_DIR%/boot/x86_64/vmlinuz-linux-t2
|
||||
INITRD ::/%INSTALL_DIR%/boot/x86_64/initramfs-linux-t2.img
|
||||
APPEND archisobasedir=%INSTALL_DIR% archisosearchuuid=%ARCHISO_UUID% archiso_nbd_srv=${pxeserver} cms_verify=y
|
||||
SYSAPPEND 3
|
||||
|
||||
LABEL arch64_nfs
|
||||
TEXT HELP
|
||||
Boot the Omarchy live medium using NFS.
|
||||
It allows you to install Omarchy or perform system maintenance.
|
||||
ENDTEXT
|
||||
MENU LABEL Omarchy install medium (x86_64, NFS)
|
||||
LINUX ::/%INSTALL_DIR%/boot/x86_64/vmlinuz-linux-t2
|
||||
INITRD ::/%INSTALL_DIR%/boot/x86_64/initramfs-linux-t2.img
|
||||
APPEND archisobasedir=%INSTALL_DIR% archiso_nfs_srv=${pxeserver}:/run/archiso/bootmnt cms_verify=y
|
||||
SYSAPPEND 3
|
||||
|
||||
LABEL arch64_http
|
||||
TEXT HELP
|
||||
Boot the Omarchy live medium using HTTP.
|
||||
It allows you to install Omarchy or perform system maintenance.
|
||||
ENDTEXT
|
||||
MENU LABEL Omarchy install medium (x86_64, HTTP)
|
||||
LINUX ::/%INSTALL_DIR%/boot/x86_64/vmlinuz-linux-t2
|
||||
INITRD ::/%INSTALL_DIR%/boot/x86_64/initramfs-linux-t2.img
|
||||
APPEND archisobasedir=%INSTALL_DIR% archiso_http_srv=http://${pxeserver}/ cms_verify=y
|
||||
SYSAPPEND 3
|
||||
@@ -0,0 +1,5 @@
|
||||
INCLUDE archiso_head.cfg
|
||||
|
||||
INCLUDE archiso_pxe-linux.cfg
|
||||
|
||||
INCLUDE archiso_tail.cfg
|
||||
@@ -0,0 +1,20 @@
|
||||
LABEL arch64
|
||||
TEXT HELP
|
||||
Boot the Omarchy install medium on BIOS.
|
||||
It allows you to install Omarchy or perform system maintenance.
|
||||
ENDTEXT
|
||||
MENU LABEL Omarchy install medium (x86_64, BIOS)
|
||||
LINUX /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux-t2
|
||||
INITRD /%INSTALL_DIR%/boot/x86_64/initramfs-linux-t2.img
|
||||
APPEND archisobasedir=%INSTALL_DIR% archisosearchuuid=%ARCHISO_UUID% quiet splash
|
||||
|
||||
# Accessibility boot option
|
||||
LABEL arch64speech
|
||||
TEXT HELP
|
||||
Boot the Omarchy install medium on BIOS with speakup screen reader.
|
||||
It allows you to install Omarchy or perform system maintenance with speech feedback.
|
||||
ENDTEXT
|
||||
MENU LABEL Omarchy install medium (x86_64, BIOS) with ^speech
|
||||
LINUX /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux-t2
|
||||
INITRD /%INSTALL_DIR%/boot/x86_64/initramfs-linux-t2.img
|
||||
APPEND archisobasedir=%INSTALL_DIR% archisosearchuuid=%ARCHISO_UUID% accessibility=on
|
||||
@@ -0,0 +1,8 @@
|
||||
INCLUDE archiso_head.cfg
|
||||
|
||||
DEFAULT arch64
|
||||
TIMEOUT 150
|
||||
|
||||
INCLUDE archiso_sys-linux.cfg
|
||||
|
||||
INCLUDE archiso_tail.cfg
|
||||
@@ -0,0 +1,35 @@
|
||||
LABEL existing
|
||||
TEXT HELP
|
||||
Boot an existing operating system.
|
||||
Press TAB to edit the disk and partition number to boot.
|
||||
ENDTEXT
|
||||
MENU LABEL Boot existing OS
|
||||
COM32 chain.c32
|
||||
APPEND hd0 0
|
||||
|
||||
# https://www.memtest.org/
|
||||
LABEL memtest
|
||||
MENU LABEL Run Memtest86+ (RAM test)
|
||||
LINUX /boot/memtest86+/memtest
|
||||
|
||||
# https://wiki.syslinux.org/wiki/index.php/Hdt_(Hardware_Detection_Tool)
|
||||
LABEL hdt
|
||||
MENU LABEL Hardware Information (HDT)
|
||||
COM32 hdt.c32
|
||||
APPEND modules_alias=hdt/modalias.gz pciids=hdt/pciids.gz
|
||||
|
||||
LABEL reboot
|
||||
TEXT HELP
|
||||
Reboot computer.
|
||||
The computer's firmware must support APM.
|
||||
ENDTEXT
|
||||
MENU LABEL Reboot
|
||||
COM32 reboot.c32
|
||||
|
||||
LABEL poweroff
|
||||
TEXT HELP
|
||||
Power off computer.
|
||||
The computer's firmware must support APM.
|
||||
ENDTEXT
|
||||
MENU LABEL Power Off
|
||||
COM32 poweroff.c32
|
||||
@@ -0,0 +1,11 @@
|
||||
DEFAULT select
|
||||
|
||||
LABEL select
|
||||
COM32 whichsys.c32
|
||||
APPEND -pxe- pxe -sys- sys -iso- sys
|
||||
|
||||
LABEL pxe
|
||||
CONFIG archiso_pxe.cfg
|
||||
|
||||
LABEL sys
|
||||
CONFIG archiso_sys.cfg
|
||||
Reference in new issue
Block a user