From c613b0e4463e078861ec13508c81dadcd24fbc6e Mon Sep 17 00:00:00 2001 From: nikstur Date: Sat, 1 Feb 2025 17:58:01 +0100 Subject: [PATCH] nixos/repart-image: fix btrfs images --- nixos/modules/image/repart-image.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nixos/modules/image/repart-image.nix b/nixos/modules/image/repart-image.nix index bbcf4815aced..5669cd8826e4 100644 --- a/nixos/modules/image/repart-image.nix +++ b/nixos/modules/image/repart-image.nix @@ -10,6 +10,7 @@ , mypy , systemd , fakeroot +, util-linux # filesystem tools , dosfstools @@ -108,6 +109,7 @@ in nativeBuildInputs = [ systemd + util-linux fakeroot ] ++ lib.optionals (compression.enable) [ compressionPkg @@ -153,7 +155,7 @@ in runHook preBuild echo "Building image with systemd-repart..." - fakeroot systemd-repart \ + unshare --map-root-user fakeroot systemd-repart \ ''${systemdRepartFlags[@]} \ ${imageFileBasename}.raw \ | tee repart-output.json