- any distro from any distro (debian, ubuntu, arch, artix, void, alpine, fedora) - YAML config for distro, arch, init, packages, users, services, bootloader - each distro backend knows how to bootstrap itself - squashfs + xorriso for ISO generation - sexy CLI with banner and colored output - examples for Artix+Euri and Project Horizon
28 lines
651 B
Python
28 lines
651 B
Python
"""Distro backends — each knows how to bootstrap itself."""
|
|
|
|
from .base import Distro
|
|
from .debian import Debian
|
|
from .arch import Arch
|
|
from .void import Void
|
|
from .alpine import Alpine
|
|
from .fedora import Fedora
|
|
|
|
REGISTRY: dict[str, type[Distro]] = {
|
|
"debian": Debian,
|
|
"ubuntu": Debian,
|
|
"arch": Arch,
|
|
"artix": Arch,
|
|
"void": Void,
|
|
"alpine": Alpine,
|
|
"fedora": Fedora,
|
|
"rocky": Fedora,
|
|
"almalinux": Fedora,
|
|
}
|
|
|
|
|
|
def get(name: str) -> type[Distro]:
|
|
cls = REGISTRY.get(name.lower())
|
|
if cls is None:
|
|
raise ValueError(f"Unknown distro: {name!r}. Available: {', '.join(sorted(REGISTRY))}")
|
|
return cls
|