Skip to content

Solution Strategy

LibreToy is built on NixOS and flakes: one codebase describes the system, and builds are reproducible.

  1. Two deliverables from one codebase. The full image — kernel and initrd included — is the default. The minimal image carries the bootloader only, is an official deliverable, and is grown to the device size from the host after copying.
  2. One builder, one configuration. mkLibreToyImage builds both deliverables from the declarative configuration: partition table, filesystems and bootloader, plus kernel and initrd for the full variant. The same configuration drives libretoy-dd while flashing and libretoy-live on the device, so partitions and images can change without writing the stick anew.
  3. GRUB boots the images. GRUB with grub-iso-multiboot starts copied images by loopback, and can be extended with further mechanisms.
  4. The libretoy-live bootloader entry. A dedicated boot entry lets the user boot an existing image, repartition the stick, or download systems from the catalog — at every boot, and under the user's control.
  5. The catalog is a flake module. The initrd evaluates the current upstream flake to reach it.