aboutsummaryrefslogtreecommitdiffstats
path: root/default.nix
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-21 02:32:31 +0000
committertv <tv@krebsco.de>2026-11-21 04:03:44 +0100
commit4e35ef641c9bca1f63c3248877295fe61d4c1d20 (patch)
tree60d2b6e0847d07beb3e06b75cfe73ac713aae86c /default.nix
parentaf7894cf1d695551ffc2211314d6f9bc5cc05feb (diff)
run-firecracker-vm: nix as a layer, a read-only store without it
The base system had nix, the nix-daemon, the host's store and nixpkgs via 9P, and a writable store on a drive, a scratch file without --store. Now all of that is in a layer of its own, layers/nix.nix, and the base system has neither nix nor nix-daemon in its closure: its store is its images, read-only, an overlay of them, or with a single image, the image itself, as overlayfs needs at least two lower layers without an upper one. This can become the base layer for guests that only run services. As a layer, nix gets an image of its own: put first, it's the same for all guests with nix, instead of in the image of whichever layer wants nix. It sets fc.nix, which the run script goes by, and nix.enable; setting nix.enable without it fails an assertion, as the run script wouldn't give the guest the drive for its store. The image decides, so the run script checks that the options fit it: a guest with nix requires --store (no more scratch store), and one without refuses --store, --store-size, --nixpkgs and --nixpkgs-cache. Without the rw-store drive, the images come first, and home after them; the store and nixpkgs aren't served, there's no fc.registration, and the initrd doesn't mount anything via 9P. The run script now waits for each of the 9P servers it starts, not only the store's.
Diffstat (limited to 'default.nix')
0 files changed, 0 insertions, 0 deletions