Skip to content

Writing OS Definitions

Tobias Vorwachs edited this page Nov 23, 2026 · 1 revision

Writing OS Definitions

An operating system is a container image plus a setup script, built into a disk image.

Systems are defined like recipes, in a repository. The official ones are in boxquell-os.

Format

One TOML file per system in os/. The file name is its id (lowercase letters, digits and -). The file without a version suffix is the default of its group; the other versions follow by descending version.

name = "Ubuntu 24.04"
group = "ubuntu"                  # definitions with the same group are versions of one system
version = "24.04"                 # the label in the version chooser
description = "Ubuntu LTS."
icon = "ubuntu.svg"               # optional, a single-colour SVG in the icons/ directory
family = "ubuntu"                 # recipes say which families they support; default is debian
package_hosts = ["archive.ubuntu.com", "security.ubuntu.com"]   # what recipes get for `@packages`
image = "ubuntu:24.04"            # the container image the system is built from
setup = '''
# Runs as root while the image is built. Install what every sandbox needs:
# bash, sudo, an OpenSSH server, curl, git, tar, iproute2, e2fsprogs (resize2fs),
# util-linux (runuser) and CA certificates.
apt-get update && apt-get install -y --no-install-recommends ...
'''

Boxquell then adds the user dev with passwordless sudo, the ssh settings and its own start scripts, and packs the result into a disk image. A system that installs a kernel and an initrd under /boot (as Debian does) also runs on the qemu backend. The others use the kernel libkrun brings. Icons take the same icon and icon_color lines as recipes.

Build and publish

boxquell os build ubuntu     # needs Docker; takes a few minutes

Put an os/ directory into a repository and add it with boxquell repo add <url>.

Warning

A definition is a script that runs with full rights inside the build container and decides what every sandbox of that system contains. Add only repositories you trust.

Next: Writing Recipes | Operating Systems | Contributing

Clone this wiki locally