Monorepo for Tangled
0

Configure Feed

Select the types of activity you want to include in your feed.

nix/microvm: revert erofs to use lz4hc, because the kernel isnt compiled with zstd support :c

Signed-off-by: dawn <dawn@tangled.org>

dawn (Jun 11, 2026, 5:14 PM +0300) 62749797 9fab6917

+10 -5
+10 -5
nix/microvm/base.nix
··· 72 72 # a single volume that will back /workspace, /var, and the nix store 73 73 microvm.storeOnDisk = true; 74 74 microvm.storeDiskType = "erofs"; 75 - # zstd 3 is sweet spot here, faster to compress than zstd 1/2, and after 3 the 76 - # compression speed really falls off for negligible improvement (eg. 9 takes 77 - # 50s for only 15mb, which is really nothing) 75 + # lz4hc, not zstd: the stock nixpkgs kernel builds erofs without 76 + # CONFIG_EROFS_FS_ZIP_ZSTD, so a zstd image fails to mount at boot ("algorithm 77 + # 3 isn't enabled on this kernel"); only lz4 is guaranteed. -Efragments and 78 + # -Ededupe are omitted because microvm.nix falls back to single-threaded 79 + # erofs-utils when either is present, which makes image builds really slow. 80 + # for now, we take the compression hit, which isn't too much anyway. 81 + # todo(dawn): figure out a guest kernel build with EROFS_FS_ZIP_ZSTD enabled + 82 + # also strip down the kernel itself, we need to host our own binary cache also 83 + # so we / downstream users don't rebuild the kernel every time. 78 84 microvm.storeDiskErofsFlags = [ 79 - "-zzstd,3" 85 + "-zlz4hc" 80 86 "-Eztailpacking" 81 - "-Efragments" 82 87 ]; 83 88 microvm.writableStoreOverlay = "/persist/rw-store"; 84 89 microvm.volumes = [