qemu-vm: create erofs with hard-dereference flag

This will ensure reproducibility between different nixos systems, where
one system has store optimization enabled (which will hardling similar
files in the nix store) and the other doesn't. Without the flag, the
same image, built on the two different systems, will have a different
number of inodes. The flag will dereference hardlinks and copy them
into the image as different inodes.

Signed-off-by: Paul Meyer <katexochen0@gmail.com>
This commit is contained in:
Paul Meyer
2025-04-02 15:45:14 +02:00
parent 9ee8a0dd22
commit bd184be272

View File

@@ -194,6 +194,7 @@ let
-L ${nixStoreFilesystemLabel} \
-U eb176051-bd15-49b7-9e6b-462e0b467019 \
-T 0 \
--hard-dereference \
--tar=f \
"$TMPDIR"/store.img