manifest_version = 6

directories = ["/dev/pts", "/dev/shm"]
files = ["/dev/tty", "/dev/random", "/dev/urandom", "/dev/null", "/dev/zero", "/dev/full"]

[[archives]]
url = "https://archive.archlinux.org/iso/2026.08.01/archlinux-bootstrap-2026.08.01-x86_64.tar.zst"
hash = "9600cef264af08899eff8f8b9bb2dd141c748a0038b651256d335e489a8dd2f6"
compression = "zstd"
subdir = "root.x86_64"

[[archives]]
url = "https://repo-default.voidlinux.org/static/xbps-static-static-0.60.4_1.x86_64-musl.tar.xz"
hash = "603b3c55e9cabd5af79b461b929b14e1556a443c97b5714d188681c2172d9e28"
compression = "xz"

[commands]
setup = """
echo "Server = https://archive.archlinux.org/repos/2026/08/01/\\$repo/os/\\$arch" > /etc/pacman.d/mirrorlist

ln -sf /proc/self/fd /dev/fd

pacman-key --init
pacman-key --populate

groupadd -g 1000 chariot
useradd -u 1000 -g 1000 -M -s /bin/bash chariot
passwd -l chariot

mkdir /chariot

sed -i 's/^DownloadUser = alpm/#DownloadUser = alpm/' /etc/pacman.conf

pacman --noconfirm -Syyu
pacman --noconfirm -S @ROOT_PACKAGES@
"""
pkg_download = "pacman --noconfirm -Sw @PACKAGE@"
pkg_install = "pacman --noconfirm -S @PACKAGE@"

[packages]
binary_map = {
    bsdtar = "libarchive",
    unzip = "unzip",
    git = "git",
    patch = "patch",
    wget = "wget",
    sha256sum = "coreutils",
    clangd = "clang"
}
root = [
    "coreutils",
    "bash",
    "python",
]
