not-os

boot

$ nix-build -A boot
/nix/store/bx5ia0lr0y8yrk2ib53akhkh703yvqxv-boot

The boot derivation creates a disk image with a FAT16 file system. It contains the kernel, the initrd, and the syslinux configuration.

It can be put in place in the complete, formatted raw disk image with dd.

Note

The reason a FAT16 parition is used instead of an EXT4 partition (either the same as the toplevel, or a dedicated boot partition), is that I didn’t manage to build a bootable EXT4 partition without using a root account (with sudo) and mounting the image (with losetup and mount).

The only way I could find to install a bootloader without root and mount was to use syslinux on a FAT16 parition.