···7272 # a single volume that will back /workspace, /var, and the nix store
7373 microvm.storeOnDisk = true;
7474 microvm.storeDiskType = "erofs";
7575- # zstd 3 is sweet spot here, faster to compress than zstd 1/2, and after 3 the
7676- # compression speed really falls off for negligible improvement (eg. 9 takes
7777- # 50s for only 15mb, which is really nothing)
7575+ # lz4hc, not zstd: the stock nixpkgs kernel builds erofs without
7676+ # CONFIG_EROFS_FS_ZIP_ZSTD, so a zstd image fails to mount at boot ("algorithm
7777+ # 3 isn't enabled on this kernel"); only lz4 is guaranteed. -Efragments and
7878+ # -Ededupe are omitted because microvm.nix falls back to single-threaded
7979+ # erofs-utils when either is present, which makes image builds really slow.
8080+ # for now, we take the compression hit, which isn't too much anyway.
8181+ # todo(dawn): figure out a guest kernel build with EROFS_FS_ZIP_ZSTD enabled +
8282+ # also strip down the kernel itself, we need to host our own binary cache also
8383+ # so we / downstream users don't rebuild the kernel every time.
7884 microvm.storeDiskErofsFlags = [
7979- "-zzstd,3"
8585+ "-zlz4hc"
8086 "-Eztailpacking"
8181- "-Efragments"
8287 ];
8388 microvm.writableStoreOverlay = "/persist/rw-store";
8489 microvm.volumes = [