From 7f70abf80ce03ac5b25175df57fe73eb71d20966 Mon Sep 17 00:00:00 2001 From: Vincent Haupert Date: Tue, 1 Aug 2023 18:08:29 +0200 Subject: [PATCH] nixos/image: write `systemd-repart` output to `$out/repart-output.json` Write the output of `systemd-repart` as a JSON file to `$out/repart-output.json`. Depending on the repart configuration, the output of `systemd-repart` contains important information, for example, when creating verity partitions: > The verity root hash itself will be included in the output of > systemd-repart. See `Verity=` in repart.d(5). --- nixos/modules/image/repart.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nixos/modules/image/repart.nix b/nixos/modules/image/repart.nix index 9e7fe6932b3..4362982f5ba 100644 --- a/nixos/modules/image/repart.nix +++ b/nixos/modules/image/repart.nix @@ -195,7 +195,9 @@ in --seed="${cfg.seed}" \ --definitions="$amendedRepartDefinitions" \ --split="${lib.boolToString cfg.split}" \ - image.raw + --json=pretty \ + image.raw \ + | tee repart-output.json ''; meta = {