From 758b4c1ea4db81efcaf4cd8fb5ce04c1b42a991f Mon Sep 17 00:00:00 2001 From: Tuomas Tynkkynen Date: Sun, 17 Dec 2017 00:26:51 +0200 Subject: [PATCH] make-disk-image.nix: Really fix write permissions in the store I think the current one applies the -exec only to those that match '-type d'. Let's switch it to something that humans can understand... --- nixos/lib/make-disk-image.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/lib/make-disk-image.nix b/nixos/lib/make-disk-image.nix index b12cf68fd36..636d0223fb7 100644 --- a/nixos/lib/make-disk-image.nix +++ b/nixos/lib/make-disk-image.nix @@ -130,7 +130,7 @@ let format' = format; in let fakeroot nixos-prepare-root $root ${channelSources} ${config.system.build.toplevel} closure # fakeroot seems to always give the owner write permissions, which we do not want - find $root/nix/store -mindepth 1 -maxdepth 1 -type f -o -type d -exec chmod -R a-w '{}' \; + find $root/nix/store -mindepth 1 -maxdepth 1 -type f -o -type d | xargs chmod -R a-w echo "copying staging root to image..." cptofs ${optionalString partitioned "-P 1"} -t ${fsType} -i $diskImage $root/* /