From 35bd1df498f1dd128f48899c940afc65667b9c52 Mon Sep 17 00:00:00 2001 From: Ryan Hughes Date: Sat, 23 Aug 2025 08:52:00 +0200 Subject: [PATCH] Add support for variable repo and refs (#23) * Add ability to define repo / refs to use * Add bare mode --- README.md | 15 +++++++++++++++ bin/omarchy-iso-make | 13 +++++++++++++ builder/cmds/autostart.sh | 5 ++++- builder/online.sh | 6 +++++- 4 files changed, 37 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 849b639..0f7b11e 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,21 @@ The Omarchy ISO is intended to provide a completely offline-capable installation Run `./bin/omarchy-iso-make` and the output goes into `./release`. +### 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`) +- `OMARCHY_BARE` - Set to `true` for bare/minimal installation (default: empty/false) + +Example usage: +```bash +OMARCHY_INSTALLER_REPO="myuser/omarchy-fork" OMARCHY_INSTALLER_REF="some-feature" ./bin/omarchy-iso-make +``` + ## Testing the ISO Run `./bin/omarchy-iso-boot [release/omarchy.iso]`. diff --git a/bin/omarchy-iso-make b/bin/omarchy-iso-make index 403f4a2..5c03cab 100755 --- a/bin/omarchy-iso-make +++ b/bin/omarchy-iso-make @@ -18,9 +18,22 @@ else BUILD_SCRIPT="builder/online.sh" fi +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_BARE="${OMARCHY_BARE:-}" + # Run the builder docker run --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_BARE=$OMARCHY_BARE" \ -v "$BUILD_RELEASE_PATH/:/out/" \ -v "$BUILD_ROOT/$BUILD_SCRIPT:/$BUILD_SCRIPT:ro" \ -v "$BUILD_ROOT/archiso:/archiso:ro" \ diff --git a/builder/cmds/autostart.sh b/builder/cmds/autostart.sh index 73976d2..4a0a8f6 100644 --- a/builder/cmds/autostart.sh +++ b/builder/cmds/autostart.sh @@ -8,6 +8,9 @@ chroot_bash() { OMARCHY_USER_EMAIL="$(>"packages.x86_64" # Retrieve the latest configurator for setting up user and selecting install disk. wget -qO "airootfs/root/configurator" \ - https://raw.githubusercontent.com/omacom-io/omarchy-configurator/HEAD/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_BARE" >airootfs/root/omarchy_bare.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"