Horcrux Portage overlay (ebuilds for Horcrux machines). Generated from CanuteTheGreat/horcrux gentoo/ (git subtree split); do not edit here.
  • Python 50.1%
  • Shell 49.1%
  • JavaScript 0.4%
  • Dockerfile 0.4%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-12-03 10:17:22 +00:00
acct-group Web UI/API login = system users via PAM; no built-in admin, no initial-admin-password 2026-11-12 15:18:05 -08:00
acct-user/comfyui hogsmeade: kernel config pkg, awccd, hogsmeade-tools, comfyui, variant Dockerfile; installer accepts install_type=desktop in answer files on the desktop image 2026-10-30 03:01:10 -07:00
app-admin/rustinion-agent app-admin/rustinion-agent: bump to 0.1.383 (release CI) [skip ci]; no version bump 2026-12-03 09:54:24 +00:00
app-containers Security: ship the vulnerability scanner (grype-bin overlay package, horcrux[security] dependency, image lists, offline database recipe) 2026-11-27 17:57:19 -08:00
app-emulation Standard ports: web UI/API on HTTPS 443 + HTTP 80 redirect; 8006 and other ports are configurable (config.toml, env, API, UI, declarative); existing nodes keep their port on upgrade 2026-12-02 15:56:33 -08:00
app-misc Wi-Fi: wpa_supplicant is the default backend everywhere (desktop NetworkManager + live/server images + installer); iwd is opt-in only; no version bump 2026-12-01 16:47:23 -08:00
ci gentoo: describe local USE flags in metadata.xml, no := inside || (pkgcheck errors); CI gate check-use-docs.py 2026-11-30 10:11:57 -08:00
gnome-base/gnome-session-openrc gnome-session-openrc 50.0-r4: the session starts gsd-xsettings (the Xwayland-session.d hook is run by gsd-xsettings itself, so X11 apps lost the UI scale after every fresh boot); boot gate gnome-x11-scale-boot-test.py (fresh boot -> greeter login -> gsd-xsettings within 60 s, two boots) 2026-11-28 20:28:34 -08:00
gnome-extra Wi-Fi: wpa_supplicant is the default backend everywhere (desktop NetworkManager + live/server images + installer); iwd is opt-in only; no version bump 2026-12-01 16:47:23 -08:00
metadata hogshead: Portage-owned T2 stack (horcrux-t2-config, horcrux-unlock, rustinion-bin ebuilds in the horcrux overlay, hogshead image variant with local firmware overlay) 2026-10-29 19:06:29 -07:00
net-misc Wi-Fi: wpa_supplicant is the default backend everywhere (desktop NetworkManager + live/server images + installer); iwd is opt-in only; no version bump 2026-12-01 16:47:23 -08:00
package.accept_keywords gentoo templates: stable by default; ~arch only where ::gentoo has no stable version; generic CFLAGS; free + redistributable licenses only; no version bump 2026-12-02 12:02:47 -08:00
package.use gentoo: fix virtual/rust references left in horcrux-9999.ebuild and package.* files 2026-09-29 16:56:28 -07:00
profiles Installer: machine profiles and auto-detected hardware layers on the stock ISO 2026-11-21 14:18:21 -08:00
sci-misc/comfyui sci-misc/comfyui: add 0.46.0, drop 0.45.0 2026-11-19 04:51:32 -08:00
sec-keys/openpgp-keys-errantsolutions Signed releases + SBOM: every published ISO, checksum, SBOM and evidence file gets an OpenPGP signature 2026-11-18 02:00:37 -08:00
sets ISO/profile: Incus + Podman are the default container runtimes, Docker is opt-in (not installed, not started); no version bump 2026-12-02 12:02:47 -08:00
surface surface profile: enable bluetooth service at install (bluetoothd was never started on the Surface edition) 2026-11-20 03:54:09 -08:00
sys-apps horcrux-core 1-r10: horcrux-doctor x11-scale never reports success for a GNOME user it cannot check (non-root + other user's session is now FAIL 'not checked', exit 1) or a helper that exits 0 without any OK line; tests 2026-12-03 02:16:37 -08:00
sys-auth/horcrux-ssh-pam Remove owner-specific machine layers from the public tree; add public leak guard (ci/check-public-leaks.py) 2026-11-15 00:40:00 -08:00
sys-cluster/ceph gentoo/ci: init-parity check joins backslash-continued lines so a multi-line inherit counts 2026-11-29 10:57:28 -08:00
sys-firmware/apple-t2-firmware-local Installer: machine profiles and auto-detected hardware layers on the stock ISO 2026-11-21 14:18:21 -08:00
sys-kernel opt-in remote (ssh) unlock of an encrypted install: dracut module horcrux-sshunlock (wired DHCP + dropbear in the initramfs, authorized keys only, forced command feeds the typed passphrase to the pending horcrux-unlock / stock ZFS / stock LUKS prompt), installer [unlock] answer keys + machine profile + guided page, horcrux-unlock ssh-enable/disable/status, QEMU gate (zfs-enc-test.py --ssh-unlock), docs; default off, nothing cached; horcrux-unlock-1-r5; no version bump 2026-12-02 17:47:56 -08:00
t2 ZFS: move to OpenZFS 2.4.4 (module in sys-fs/zfs, zfs-kmod retired), migrate 2.3 installs, never upgrade pools 2026-11-29 18:12:03 -08:00
make.conf.horcrux gentoo templates: stable by default; ~arch only where ::gentoo has no stable version; generic CFLAGS; free + redistributable licenses only; no version bump 2026-12-02 12:02:47 -08:00
README.md Prefer Podman over Docker as the default OCI/app-container + stack runtime 2026-11-15 05:02:59 -08:00

Horcrux Gentoo Installation Guide

This directory contains Gentoo Linux configuration files optimized for running Horcrux as a virtualization host.

Quick Installation

1. Copy Configuration Files

# Copy USE flags
cp package.use/horcrux /etc/portage/package.use/

# Copy keywords (for testing packages)
cp package.accept_keywords/horcrux /etc/portage/package.accept_keywords/

# Copy package set
cp sets/horcrux /etc/portage/sets/

# Review and merge make.conf settings
cat make.conf.horcrux >> /etc/portage/make.conf  # Review before running!

2. Install Required Packages

# Update package database
emerge --sync

# Install the Horcrux package set
emerge --ask --verbose @horcrux

3. Kernel Configuration

Ensure your kernel has these options enabled:

# Virtualization
CONFIG_VIRTUALIZATION=y
CONFIG_KVM=y
CONFIG_KVM_INTEL=y        # For Intel CPUs
CONFIG_KVM_AMD=y          # For AMD CPUs
CONFIG_VHOST_NET=y
CONFIG_VHOST_VSOCK=y

# VirtIO (guest drivers)
CONFIG_VIRTIO=y
CONFIG_VIRTIO_PCI=y
CONFIG_VIRTIO_BLK=y
CONFIG_VIRTIO_NET=y
CONFIG_VIRTIO_CONSOLE=y
CONFIG_VIRTIO_BALLOON=y

# IOMMU for GPU passthrough
CONFIG_IOMMU_SUPPORT=y
CONFIG_INTEL_IOMMU=y      # For Intel
CONFIG_AMD_IOMMU=y        # For AMD

# Containers
CONFIG_NAMESPACES=y
CONFIG_CGROUPS=y
CONFIG_CGROUP_DEVICE=y
CONFIG_MEMCG=y
CONFIG_CPUSETS=y
CONFIG_OVERLAY_FS=y

# Networking
CONFIG_BRIDGE=y
CONFIG_VETH=y
CONFIG_MACVLAN=y
CONFIG_IPVLAN=y
CONFIG_VXLAN=y
CONFIG_TUN=y
CONFIG_NETFILTER=y
CONFIG_NF_TABLES=y

# Storage
CONFIG_BLK_DEV_LOOP=y
CONFIG_BLK_DEV_NBD=y
CONFIG_SCSI_VIRTIO=y
CONFIG_FUSE_FS=y

4. Enable Services

# OpenRC
rc-update add libvirtd default
rc-update add podman default          # preferred OCI runtime (docker-compatible socket)
rc-update add podman-restart default  # restart containers with a restart policy at boot
rc-update add docker default          # optional, secondary
rc-update add sshd default
rc-update add nftables default

# SystemD
systemctl enable libvirtd
systemctl enable --now podman.socket podman-restart.service   # preferred OCI runtime
systemctl enable docker                                       # optional, secondary
systemctl enable sshd
systemctl enable nftables

5. Install Horcrux

# From source
git clone https://github.com/horcrux/horcrux.git
cd horcrux
cargo build --release

# Install binaries
install -m 755 target/release/horcrux /usr/local/bin/
install -m 755 target/release/horcrux-api /usr/local/bin/

# Install configuration
mkdir -p /etc/horcrux
cp build/configs/*.toml /etc/horcrux/

# Install service
cp build/configs/horcrux.initd /etc/init.d/horcrux
chmod +x /etc/init.d/horcrux
rc-update add horcrux default

Package Categories

Minimal Installation

Essential packages only:

emerge app-emulation/qemu app-emulation/libvirt sys-fs/lvm2

Full virtualization + containers:

emerge @horcrux

Full Installation

Everything including Kubernetes:

emerge @horcrux sys-cluster/kubernetes sys-cluster/kubectl sys-cluster/helm

Architecture-Specific Notes

x86_64 (AMD64)

  • Enable KVM_INTEL or KVM_AMD based on your CPU
  • IOMMU requires intel_iommu=on or amd_iommu=on in kernel cmdline

ARM64 (AArch64)

  • Use ACCEPT_KEYWORDS="~arm64" for most packages
  • Some packages may need cross-compilation

RISC-V

  • Very experimental, use ACCEPT_KEYWORDS="~riscv"
  • Many packages not yet available

Troubleshooting

QEMU Won't Start VMs

# Check KVM module
modprobe kvm kvm_intel  # or kvm_amd

# Check permissions
ls -la /dev/kvm
# Should be owned by kvm group

# Add user to kvm group
usermod -aG kvm username

Docker Fails to Start

# Check cgroup configuration
cat /proc/cgroups

# Ensure overlay module is loaded
modprobe overlay

# Check Docker service
rc-service podman status
journalctl -u docker  # SystemD

GPU Passthrough Not Working

# Check IOMMU groups
for d in /sys/kernel/iommu_groups/*/devices/*; do
    n=${d#*/iommu_groups/*}; n=${n%%/*}
    printf 'IOMMU Group %s ' "$n"
    lspci -nns "${d##*/}"
done

# Bind GPU to VFIO
echo "options vfio-pci ids=XXXX:XXXX" > /etc/modprobe.d/vfio.conf

Minimum

  • 4 CPU cores
  • 8 GB RAM
  • 100 GB storage
  • 8+ CPU cores with VT-x/AMD-V
  • 32+ GB RAM
  • SSD/NVMe storage
  • IOMMU support for GPU passthrough

Production

  • Dual CPU with 16+ cores each
  • 128+ GB ECC RAM
  • Enterprise NVMe or SAN storage
  • Redundant networking
  • IPMI/BMC for remote management

Hardware profiles (live/installer ISO variants)

gentoo/<profile>/ holds everything the ISO builder and the installer need for one family of machines (packages, USE, overlay files, kernel notes, DMI match + installer defaults in hwprofile.toml). Build with HW_PROFILE=<profile> build/live-iso/build.sh; the installer picks the profile itself from DMI (liveinst/hwprofile.py). Current profiles: surface/ (Microsoft Surface, focus Surface Pro 1; reasoning in docs/SURFACE.md); the T2 Mac profile lives under gentoo/t2/ (see docs/T2-MACS.md).