Horcrux Portage overlay (ebuilds for Horcrux machines). Generated from CanuteTheGreat/horcrux gentoo/ (git subtree split); do not edit here.
  • Shell 64.6%
  • Python 34.1%
  • Dockerfile 1.3%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-11-09 22:10:42 +00:00
app-admin/rustinion-agent app-admin/rustinion-agent: bump to 0.1.347 (release CI) [skip ci]; no version bump 2026-11-09 21:04:34 +00:00
app-emulation gentoo: horcrux-9999 src_unpack runs cargo_live_src_unpack from ${S}: the 20261108 snapshot's eclass runs cargo fetch in the cwd (WORKDIR) and died 'could not find Cargo.toml' in the unpack phase (Gentoo Docker Build run 1681 job 78735; 20261107 snapshot passed); no version bump 2026-11-09 00:38:42 -08:00
app-misc horcrux-test-watchdog: always arm softdog too: gringotts' iTCO_wdt (ThinkBook 16 G6 IRL) accepts pets but never resets the machine (SIGSTOP pet 7 min, killed pet 2 min: no reset); with softdog the stopped pet resets gringotts in 61 s (hogshead 61 s, softdog only); no version bump 2026-11-07 08:48:16 -08:00
ci manager as a real package (app-emulation/horcrux-bin: keyworded, qemu[spice], installed by the core layer, prebuilt tarball from the image build), SPICE in the server image, container role package (incus/podman/buildah) with keywords+USE via repo-config, greeter gate, docs/ROLES.md, real-Portage role checks 2026-11-05 01:38:06 -08:00
gnome-extra/horcrux-gnome-defaults server-first layering: core (sys-apps/horcrux-core) -> desktop edition -> machine layers; headless server gate; docs 2026-11-04 20:45:54 -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 server-first layering: core (sys-apps/horcrux-core) -> desktop edition -> machine layers; headless server gate; docs 2026-11-04 20:45:54 -08:00
package.accept_keywords fix(nas,monitoring,ui): working S3 gateway page, user dashboards, monitoring trends, users edit 2026-10-19 00:52:23 -07: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 overlay: sys-apps/horcrux-repo-config owns the [horcrux] repos.conf entry (git sync from the overlay's own repo, auto-sync yes); horcrux-gnome-defaults-1-r2 pulls it into every GNOME install; images ship the tree as a git checkout; profiles/categories 2026-11-04 20:44:49 -08:00
sets Refactor Web UI into modular pages and add Gentoo build system 2025-12-19 11:46:50 -08:00
surface test machines: horcrux-test-machine-1-r2 (blocks + denies the owner's private gringotts-config/-tools, checker also flags denied atoms/repos left in /etc/portage), surface profile -r3 (XFCE media keys bound to wpctl, no personal overlay), surface-xfce-test uses Firefox instead of Brave + media-key/no-personal-app steps, QEMU greeter gate fails on a root greeter process 2026-11-05 11:41:03 -08:00
sys-apps test machines: no personal backup schedule. horcrux-backup-1-r6 gets USE personal-backup (default on; off = wrapper binaries only, no cron.d/timers); horcrux-test-machine-1-r5 sets -personal-backup in its package-owned package.use (the live installer writes the same line). A test machine has no personal data, so a reinstall no longer brings the restic cron lines (and a Rustinion backup job) back. Checked with real Portage (ebuild install in gentoo/stage3, both USE states, both +/-plain) and the 361 installer unit tests 2026-11-06 13:25:17 -08:00
sys-kernel test-machine: horcrux-unlock -encrypted keeps dm (live.conf dmsquash-live needs it); XFCE power defaults via horcrux-surface-desktop[test-machine] + test-machine[xfce] 2026-11-04 20:46:22 -08:00
t2 t2: kernel pin 7.2.13 -> 7.2.15 (Gentoo dropped 7.2.13 from the tree; same drift as the Surface pin) 2026-11-04 20:45:37 -08:00
make.conf.horcrux Refactor Web UI into modular pages and add Gentoo build system 2025-12-19 11:46:50 -08:00
README.md gentoo/README: hardware profiles 2026-10-28 21:58:54 -07: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 docker default
rc-update add sshd default
rc-update add nftables default

# SystemD
systemctl enable libvirtd
systemctl enable docker
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 docker 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).