From 9687fe329ccc88b13d3614a8d8d332a3ea3dcab9 Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 16 Nov 2026 23:58:26 +0000 Subject: serve nixpkgs to the guest via 9P instead of from the store A outside the store got copied (i.e. hashed) to the store on every evaluation, for the guest's NIX_PATH, so no-op builds still took ~25s with a checkout. Now a third 9P server serves nixpkgs from wherever it is, read-only, at /nixpkgs in the guest, which NIX_PATH points to. It's in neither the closure nor the registration any more, and run-firecracker-vm --nixpkgs DIR can serve another one. --- README.md | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'README.md') diff --git a/README.md b/README.md index 6435038..4174b03 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,7 @@ The guest gets: for speed, and a writable layer on top, so nix and `nix-shell` work; - `/xchg`: the directory `xchg` in the current working directory, shared with the host (and with other VMs started in the same directory); +- `/nixpkgs`: the host's nixpkgs, read-only, on the guest's `NIX_PATH`; - network access only to HTTPS, through a proxy on the host that allows only listed domains, optionally only listed paths. @@ -54,6 +55,9 @@ removed when the guest exits. To keep it across boots: The file gets created (sparse, default 16G) if it doesn't exist. Only one VM at a time can use it. +`/nixpkgs` is the nixpkgs the guest was built from (``, checkout +or not); `--nixpkgs DIR` serves another one. + To use a cut-down kernel, based on Firecracker's recommended guest configuration, instead of `linuxPackages_latest`: -- cgit v1.3.1