# Where Are the PKGBUILDs for Omarchy Located?

> Find PKGBUILDs for Omarchy in the separate omarchy-pkgs repository within the pkgbuilds directory. Learn where to access these essential build files.

- Repository: [37signals/omarchy](https://github.com/basecamp/omarchy)
- Tags: how-to-guide
- Published: 2026-08-29

---

**The PKGBUILDs for Omarchy are stored in the separate `omarchy-pkgs` companion repository under the `pkgbuilds/` directory, not in the main `basecamp/omarchy` repository.**

The Omarchy project maintains a strict separation between its core application source and its Arch Linux packaging configuration. While the main application logic lives in the `basecamp/omarchy` repository, the Arch PKGBUILD scripts that define build dependencies, installation paths, and package metadata reside in a dedicated external repository.

## Repository Separation: Main Code vs. Packaging

The `basecamp/omarchy` repository explicitly documents this architectural split. According to [`docs/file-layout.md`](https://github.com/basecamp/omarchy/blob/main/docs/file-layout.md) at line 8, the repository produces two Arch packages, but the PKGBUILD files themselves live in the companion `omarchy-pkgs` repository under the `pkgbuilds/` subdirectory. This external repository—located at `github.com/omacom-io/omarchy-pkgs`—contains the canonical build scripts for both the `omarchy` and `omarchy-settings` packages.

You can view the specific PKGBUILDs at:
- `https://github.com/omacom-io/omarchy-pkgs/tree/main/pkgbuilds/omarchy`
- `https://github.com/omacom-io/omarchy-pkgs/tree/main/pkgbuilds/omarchy-settings`

## How the Main Repository References PKGBUILDs

Several components within the main Omarchy codebase interact with the external PKGBUILD repository to validate builds and support development workflows:

- **[`docs/file-layout.md`](https://github.com/basecamp/omarchy/blob/main/docs/file-layout.md)** (line 8): Officially documents that PKGBUILDs are stored externally in `omarchy-pkgs/pkgbuilds/`.
- **[`test/shell.d/config-test.sh`](https://github.com/basecamp/omarchy/blob/main/test/shell.d/config-test.sh)** (lines 120-125): Validates packaging coverage by searching for PKGBUILDs in either a checkout of `omarchy-pkgs` or a local `pkgbuilds/` directory.
- **`bin/omarchy-dev-pkg-test`** (lines 31-35): Developer tooling that reads PKGBUILDs from the path specified in the `OMARCHY_PKGBUILDS_DIR` environment variable, defaulting to `~/Work/omarchy/omarchy-pkgs/pkgbuilds`.

## Working with PKGBUILDs Locally

When developing or debugging Omarchy packages, you need to locate the PKGBUILDs on your local filesystem. The development scripts expect the `omarchy-pkgs` repository to be checked out separately from the main application code.

### Locating PKGBUILDs in Scripts

Use the same path resolution logic found in `bin/omarchy-dev-pkg-test` to find the build files programmatically:

```bash

# Default location (can be overridden with OMARCHY_PKGBUILDS_DIR)

PKGBUILDS_ROOT="${OMARCHY_PKGBUILDS_DIR:-$HOME/Work/omarchy/omarchy-pkgs/pkgbuilds}"

# Example: path to the main Omarchy PKGBUILD

OMARCHY_PKGBUILD="${PKGBUILDS_ROOT}/omarchy/PKGBUILD"

if [[ -f "$OMARCHY_PKGBUILD" ]]; then
    echo "Found PKGBUILD at $OMARCHY_PKGBUILD"
else
    echo "PKGBUILD not found – set OMARCHY_PKGBUILDS_DIR to the proper checkout"
fi

```

### Building Packages Locally

Once located, build and install the packages using standard Arch tooling:

```bash
cd "${PKGBUILDS_ROOT}/omarchy"
makepkg -si   # Build and install the Omarchy package

```

### Validating PKGBUILD Coverage

The test suite ensures both required packages have valid build scripts. This pattern from [`test/shell.d/config-test.sh`](https://github.com/basecamp/omarchy/blob/main/test/shell.d/config-test.sh) verifies PKGBUILD presence:

```bash

# This mirrors the logic used by the Omarchy test suite:

pkgs_root=$(find_omarchy_pkgs_root)   # Locate the omarchy-pkgs checkout

for pkg in omarchy omarchy-settings; do
    [[ -f "$pkgs_root/$pkg/PKGBUILD" ]] || echo "Missing PKGBUILD for $pkg"
done

```

## Summary

- **PKGBUILDs for Omarchy** reside in the `omarchy-pkgs` companion repository under the `pkgbuilds/` directory, not within `basecamp/omarchy`.
- The **`omarchy`** and **`omarchy-settings`** packages are defined in `pkgbuilds/omarchy/` and `pkgbuilds/omarchy-settings/` respectively.
- Environment variable **`OMARCHY_PKGBUILDS_DIR`** overrides the default path in development scripts like `bin/omarchy-dev-pkg-test`.
- **[`docs/file-layout.md`](https://github.com/basecamp/omarchy/blob/main/docs/file-layout.md)** at line 8 officially documents this repository separation decision.
- The test suite in **[`test/shell.d/config-test.sh`](https://github.com/basecamp/omarchy/blob/main/test/shell.d/config-test.sh)** (lines 120-125) validates PKGBUILD presence during continuous integration.

## Frequently Asked Questions

### Why are Omarchy PKGBUILDs in a separate repository?

Separating packaging scripts from application source follows Arch Linux packaging best practices and allows the build specifications to evolve independently from the application code. This isolation prevents packaging metadata from cluttering the main development history while ensuring the `omarchy-pkgs` repository can track Arch-specific changes separately.

### How do I set a custom PKGBUILD directory for development?

Export the **`OMARCHY_PKGBUILDS_DIR`** environment variable to point to your local checkout of `omarchy-pkgs`. The script `bin/omarchy-dev-pkg-test` reads this variable at lines 31-35, falling back to `~/Work/omarchy/omarchy-pkgs/pkgbuilds` only when the variable is unset.

### What packages are defined in the omarchy-pkgs repository?

The repository defines exactly two packages: **`omarchy`** (the main application) and **`omarchy-settings`** (configuration utilities). Each package maintains its own subdirectory under `pkgbuilds/` with its own `PKGBUILD` file and associated installation scripts.

### Does the test suite verify that PKGBUILDs exist?

Yes, **[`test/shell.d/config-test.sh`](https://github.com/basecamp/omarchy/blob/main/test/shell.d/config-test.sh)** between lines 120-125 validates that PKGBUILDs exist for both required packages. The test searches for the files either in a local `pkgbuilds/` directory or within a checkout of the `omarchy-pkgs` repository, failing the build if either PKGBUILD is missing.