From f03674d8680c1eb69074d8601a477e7dd51e517f Mon Sep 17 00:00:00 2001 From: Michael Hoang Date: Wed, 16 Jul 2025 13:20:42 +1000 Subject: [PATCH] make-squashfs: drop references to build closure --- nixos/lib/make-squashfs.nix | 4 ++++ 1 file changed, 4 insertions(+) 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 =