From 1b592cdeb46e83635461cb930daa221e9f24859f Mon Sep 17 00:00:00 2001 From: Arian van Putten Date: Thu, 10 Oct 2024 11:48:36 +0200 Subject: [PATCH] nixos/image/repart: unsafeDiscardReferences.out = true Lets set this in the repart module instead of the verity module --- nixos/modules/image/repart-image.nix | 5 +++++ nixos/modules/image/repart-verity-store.nix | 8 -------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/nixos/modules/image/repart-image.nix b/nixos/modules/image/repart-image.nix index cc4c2211e3d3..bbcf4815aced 100644 --- a/nixos/modules/image/repart-image.nix +++ b/nixos/modules/image/repart-image.nix @@ -101,6 +101,11 @@ in ) // { __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 = [ systemd fakeroot diff --git a/nixos/modules/image/repart-verity-store.nix b/nixos/modules/image/repart-verity-store.nix index e8706a5f79d0..d270dc069f34 100644 --- a/nixos/modules/image/repart-verity-store.nix +++ b/nixos/modules/image/repart-verity-store.nix @@ -117,10 +117,6 @@ in # do not prepare the ESP, this is done in the final image systemdRepartFlags = previousAttrs.systemdRepartFlags ++ [ "--defer-partitions=esp" ]; - - # the image will be self-contained so we can drop references - # to the closure that was used to build it - unsafeDiscardReferences.out = true; } ); @@ -210,10 +206,6 @@ in rm -v repart-output_orig.json ''; - - # the image will be self-contained so we can drop references - # to the closure that was used to build it - unsafeDiscardReferences.out = true; } ); };