diff --git a/nixos/lib/make-squashfs.nix b/nixos/lib/make-squashfs.nix index 49c926760106..4903659bbfd7 100644 --- a/nixos/lib/make-squashfs.nix +++ b/nixos/lib/make-squashfs.nix @@ -27,6 +27,10 @@ stdenv.mkDerivation { name = "${fileName}${lib.optionalString (!hydraBuildProduct) ".img"}"; __structuredAttrs = true; + # the image will be self-contained so we can drop references + # to the closure that was used to build it + unsafeDiscardReferences.out = true; + nativeBuildInputs = [ squashfsTools ]; buildCommand =