Custom Arch packages (PKGBUILDs + built .pkg.tar.zst) served as a pacman repo
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-07-14 12:15:01 -06:00
PKGBUILDs/proxmox-backup-client-bin add proxmox-backup-client-bin 4.2.2_1-1 + homelab pacman repo 2026-07-12 13:39:46 -06:00
scripts Add scripts/homelab-key signing-key tool + homelab-pubkey.asc; README: signed repo, file:// serving 2026-07-14 12:15:01 -06:00
x86_64 add proxmox-backup-client-bin 4.2.2_1-1 + homelab pacman repo 2026-07-12 13:39:46 -06:00
.gitignore add proxmox-backup-client-bin 4.2.2_1-1 + homelab pacman repo 2026-07-12 13:39:46 -06:00
homelab-pubkey.asc Add scripts/homelab-key signing-key tool + homelab-pubkey.asc; README: signed repo, file:// serving 2026-07-14 12:15:01 -06:00
README.md Add scripts/homelab-key signing-key tool + homelab-pubkey.asc; README: signed repo, file:// serving 2026-07-14 12:15:01 -06:00

arch-pkgs

Custom Arch packages — PKGBUILDs (source) + built .pkg.tar.zst (x86_64/) served as a local pacman repo. Version-controlled so the fleet's custom packages are tracked + recoverable.

All packages and the repo DB are GPG-signed with the Homelab Packages key (ed25519/BB89804D527355CC, fingerprint 0BC26CDC4E7B079B98E2BA0ABB89804D527355CC; public key in homelab-pubkey.asc). Anonymous clone works: git clone https://git.lan/homelab/arch-pkgs.git.

Use as a pacman repo (servers)

Forgejo raw serving was flaky, so each server clones the repo locally and pacman reads it via file://:

git clone https://git.lan/homelab/arch-pkgs.git /srv/repo/arch-pkgs

One-time — trust the signing key:

pacman-key --add /srv/repo/arch-pkgs/homelab-pubkey.asc
pacman-key --lsign-key 0BC26CDC4E7B079B98E2BA0ABB89804D527355CC

/etc/pacman.conf:

[homelab]
SigLevel = Required TrustedOnly
Server = file:///srv/repo/arch-pkgs/x86_64

Then pacman -Sy && pacman -S <pkg>. pacman -Qm lists installed custom packages; pacman -Sl homelab lists what's available.

Build + sign a package (desktop)

Prereq: the signing key in the build user's keyring + GPGKEY="BB89804D527355CC" in ~/.makepkg.conf (run scripts/homelab-key import — see below). The key is unprotected, so makepkg/repo-add sign headless (no pinentry prompt).

git clone https://aur.archlinux.org/<pkg>.git PKGBUILDs/<pkg>
cd PKGBUILDs/<pkg> && makepkg --sign                          # --sign uses $GPGKEY -> <pkg>.sig
mkdir -p ../../x86_64 && cp *.pkg.tar.zst *.pkg.tar.zst.sig ../../x86_64/
cd ../../x86_64
repo-add homelab.db.tar.gz *.pkg.tar.zst                      # regenerate db (+ files db)
rm -f homelab.db homelab.files
mv homelab.db.tar.gz homelab.db && mv homelab.files.tar.gz homelab.files
gpg --detach-sign --local-user BB89804D527355CC homelab.db homelab.files   # sign the renamed dbs
cd .. && git add -A && git commit -m "add <pkg>" && git push

repo-add rejects the bare .db extension, so build to .db.tar.gz then rename (and sign the renamed file). Update flow: rebuild on desktop → push → git pull on each server → pacman -Sy.

scripts/homelab-key — manage the signing key

Source of truth is server1 (the server user's keyring). The key is unprotected (headless signing) — treat the exported secret file as a live secret and shred it after importing.

# 1. on server1
scripts/homelab-key export                                   # -> ~/homelab-signing-secret.asc (0600)
# 2. on the desktop
scp server1-auto:~/homelab-signing-secret.asc ~/
scripts/homelab-key import                                   # imports key, sets ~/.makepkg.conf GPGKEY, sign test
shred -u ~/homelab-signing-secret.asc

System-wide install: install -m 0755 scripts/homelab-key /usr/local/bin/homelab-key.