From ab5faea41ef2ee8a2e0ad65dd6054bb316db6e17 Mon Sep 17 00:00:00 2001 From: Ben Wolsieffer Date: Sat, 11 Jul 2020 17:24:59 -0400 Subject: [PATCH] nixos/stage-1: fix initrd secrets with custom compressor --- nixos/modules/system/boot/stage-1.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nixos/modules/system/boot/stage-1.nix b/nixos/modules/system/boot/stage-1.nix index d551466f52eb..3e43de9e6d87 100644 --- a/nixos/modules/system/boot/stage-1.nix +++ b/nixos/modules/system/boot/stage-1.nix @@ -374,7 +374,8 @@ let ) config.boot.initrd.secrets) } - (cd "$tmp" && find . | cpio -H newc -o) | gzip >>"$1" + (cd "$tmp" && find . -print0 | sort -z | cpio -o -H newc -R +0:+0 --reproducible --null) | \ + ${config.boot.initrd.compressor} >> "$1" ''; in