X Linux
Documentation menu

Overview/Scripts and CLI

x — packaging

The provisioning payload is packaged as x-scripts with a plain PKGBUILD + makepkg in packaging/. (The Rust tooling xpkg/xpm is currently out of scope for packaging; see the workspace ROADMAP, Phase 4.)

Building x-scripts

packaging/PKGBUILD produces the Arch package (any, depends on bash):

  • Ships bin, install, skel, etc, config, hardware, tools, migrations and themes to /usr/share/x.
  • Makes every *.sh (and the x dispatcher) executable under /usr/share/x/{bin,install,hardware,tools}.
  • Installs /usr/bin/x as a symlink to /usr/share/x/bin/x.
  • If packaging/.vendor/x-config exists, its contents are merged into /usr/share/x/config (the offline config tree used by tools/hyprland-install.sh). There are no remote source=() entries: the snapshot is vendored in-repo and never fetched at build time.

Version metadata: pkgver=0.1.0, pkgrel bumped per iteration (currently 11 in the PKGBUILD). A leftover build artifact (packaging/x-scripts-0.1.0-5-any.pkg.tar.zst) sits in the directory but is stale and git-ignored (*.pkg.tar.zst); rebuild produces the current pkgrel.

To build (network-free regarding the config sources; the vendored tree must be present first, see below):

cd packaging
makepkg   # requires packaging/.vendor/x-config to be present

packaging/.gitignore ignores src/, pkg/, .vendor/ and built artifacts.

vendor-config.sh — the offline snapshot

packaging/vendor-config.sh regenerates the vendored config snapshot at packaging/.vendor/x-config from the external source repos (branch main), which are used read-only and remain the source of truth:

  • xscriptor-colors/hyprlandhypr, hypridle, rofi, dunst, cava, sddm, pam.d, plus scriptsscripts.
  • xscriptor-colors/terminal → kitty only (kitty.conf + themes/).
  • xscriptor-colors/nvim → the whole nvim tree.

Behavior:

  • Refuses to run as root; requires git and network access (shallow clones).
  • Strips .git/.github from each clone and from the final tree.
  • Excludes NVIDIA: scripts/gpu-mode.sh (an envycontrol/Optimus wrapper) is removed and the script verifies it is gone; nothing NVIDIA-related is vendored or configured.
  • Never modifies the external repos.
  • Prints the pinned commits of the three sources and a per-directory file count when done.
packaging/vendor-config.sh        # from the repo root
packaging/vendor-config.sh /path/to/repo

The .vendor output is git-ignored, so it must be (re)generated by a maintainer before building; it is not part of git history. config/hypr/README.md documents the same flow.

Vendored layout

packaging/.vendor/x-config
├── hypr/ hypridle/ rofi/ dunst/ cava/ sddm/ pam.d/   ← hyprland repo
├── scripts/                                          ← hyprland repo (→ ~/.config/hypr/scripts)
├── kitty/                                            ← terminal repo (kitty.conf + themes/)
└── nvim/                                             ← nvim repo

Shipped by the PKGBUILD as /usr/share/x/config, this mirrors the hyprland layout one level up (config/hyprhypr, config/<rel><rel>, scriptsscripts), which is exactly how tools/hyprland-install.sh consumes it.

Offline ISO usage

The point of vendoring is that a Hyprland desktop can be provisioned offline right after install:

  1. A maintainer runs vendor-config.sh and builds x-scripts (snapshot embedded in the package).
  2. The distro (xlnux/x) installs x-scripts on the target and runs the root phases during install.
  3. At first boot the user phase runs tools/hyprland-install.sh, which finds /usr/share/x/config and deploys configs without any external clone. Package installation (official + AUR) is the only part that needs a repository/network, since the configs themselves travel inside the package.

Notes / current state (from the workspace ROADMAP):

  • x-base.packages (the builder-readable base list) is shipped but does not yet have a consumer wired into the distro builder.
  • The distro-side offline mirror bundling (fully network-less install) remains a pending improvement in xlnux/x.

Edit this page on GitHub