From d4b3a096c020145183dfa756c15d142b5491dc69 Mon Sep 17 00:00:00 2001 From: Paul Meyer Date: Fri, 20 Dec 2024 09:24:31 +0100 Subject: [PATCH] nixos/image: use erofs-utils' --hard-dereference flag to make image builds reproducible between systems with nix store optimization enables/disabled. Signed-off-by: Paul Meyer --- packages/nixos/image.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/nixos/image.nix b/packages/nixos/image.nix index caf834473..f21f1bafe 100644 --- a/packages/nixos/image.nix +++ b/packages/nixos/image.nix @@ -28,6 +28,12 @@ in name = "image-podvm-gpu"; inherit (config.system.image) version; + mkfsOptions.erofs = [ + # Dereference hardlinks to avoid different number of inodes between images + # built on systems with nix store optimization enabled and disabled. + "--hard-dereference" + ]; + # This defines the actual partition layout. partitions = { # EFI System Partition, holds the UKI.