5.0 KiB
Omarchy Repository
A custom Arch Linux repository for managing and distributing packages.
Directory Structure
omarchy-repo/
├── x86_64/ # Repository packages and database
├── src/ # AUR package build sources
├── build/ # Docker build files
├── bin/ # Management scripts
└── packages # Package list
Quick Start
-
Add packages to track:
- Edit
packagesfile (system auto-detects if official or AUR)
- Edit
-
Build packages in Docker:
./bin/build -
Update repository database:
./bin/update-repo
Configuration
Local Usage
Add this to /etc/pacman.conf (before other repositories for priority):
[omarchy]
SigLevel = Optional TrustAll
Server = file:///home/ryan/Dev/omarchy-repo/x86_64
Remote Server Setup
To serve this repository over HTTP:
-
Using Python (temporary):
cd /home/ryan/Dev/omarchy-repo/x86_64 python -m http.server 8080 -
Using nginx (permanent):
server { listen 80; server_name repo.yourdomain.com; root /home/ryan/Dev/omarchy-repo/x86_64; autoindex on; } -
Client configuration:
[omarchy] SigLevel = Optional TrustAll Server = http://repo.yourdomain.com
Scripts Usage
build
Builds all packages in Docker container (no local installation).
# Build everything
./bin/build
# Options:
./bin/build --only "yay walker-bin" # Build specific packages
./bin/build --skip-pgp # Skip PGP signature verification
./bin/build --force # Force rebuild even if no updates
./bin/build --keep-image # Keep Docker image after build
update-repo
Updates the repository database with all packages in x86_64/.
# Update database
./bin/update-repo
# Options:
./bin/update-repo --verify # Only verify the database
./bin/update-repo --sign # Sign database with GPG
./bin/update-repo --stats # Show repository statistics
clean-repo
Maintains the repository by removing old packages.
# Keep only latest 2 versions
./bin/clean-repo
# Options:
./bin/clean-repo --keep 3 # Keep 3 versions
./bin/clean-repo --dry-run # Preview what would be removed
./bin/clean-repo --all # Remove all packages (dangerous!)
sync-repo
Syncs repository to remote server.
# Sync to configured remote
./bin/sync-repo ./x86_64
ISO Integration
To include this repository in an Arch ISO:
- Copy the entire
x86_64/directory to the ISO - Add the repository configuration to the ISO's
pacman.conf - The packages will be available during installation
Package Management
Adding Packages
- Add package name to
packages.officialorpackages.aur - Run
./scripts/build-packages.sh - Run
./scripts/update-repo.sh
Removing Packages
- Remove package name from the list files
- Delete the package file from
x86_64/ - Run
./scripts/update-repo.sh
Updating Packages
Simply run the build script again - it will download/build the latest versions:
./scripts/build-packages.sh
./scripts/update-repo.sh
Security
Package Signing (Optional)
-
Create a GPG key:
gpg --gen-key -
Export public key:
gpg --export --armor "Your Name" > omarchy-repo.key -
Sign packages during build:
./scripts/update-repo.sh --sign -
Client configuration:
[omarchy] SigLevel = Required Server = file:///home/ryan/Dev/omarchy-repo/x86_64
Maintenance
Regular Updates
Create a systemd timer or cron job for automatic updates:
# /etc/cron.daily/omarchy-repo-update
#!/bin/bash
cd /home/ryan/Dev/omarchy-repo
./scripts/build-packages.sh
./scripts/update-repo.sh
./scripts/clean-repo.sh --keep 2
Backup
Important files to backup:
packages.officialpackages.aurx86_64/*.pkg.tar.*- GPG keys (if using signing)
Troubleshooting
Common Issues
-
"No packages found"
- Run
./scripts/build-packages.shfirst
- Run
-
AUR build failures
- Check build dependencies
- Try manual mode:
./scripts/build-packages.sh --manual
-
Repository not recognized by pacman
- Ensure the repository is listed before other repos in
/etc/pacman.conf - Run
sudo pacman -Syto sync databases
- Ensure the repository is listed before other repos in
-
Permission errors
- Some operations need sudo (downloading official packages)
- Ensure scripts are executable:
chmod +x scripts/*.sh
Advanced Usage
Mirror Synchronization
To sync with another omarchy instance:
rsync -av --delete \
user@remote:/path/to/omarchy-repo/x86_64/ \
/home/ryan/Dev/omarchy-repo/x86_64/
Custom Build Flags
For AUR packages, edit /etc/makepkg.conf to customize:
CFLAGS/CXXFLAGSfor optimizationMAKEFLAGSfor parallel compilationPACKAGERfor package attribution
License
This repository structure and scripts are provided as-is for personal use.