Skip to content

Commit 758b4c1

Browse files
committedDec 20, 2017
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...
1 parent 3c82e6f commit 758b4c1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎nixos/lib/make-disk-image.nix

+1-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ let format' = format; in let
130130
fakeroot nixos-prepare-root $root ${channelSources} ${config.system.build.toplevel} closure
131131
132132
# fakeroot seems to always give the owner write permissions, which we do not want
133-
find $root/nix/store -mindepth 1 -maxdepth 1 -type f -o -type d -exec chmod -R a-w '{}' \;
133+
find $root/nix/store -mindepth 1 -maxdepth 1 -type f -o -type d | xargs chmod -R a-w
134134
135135
echo "copying staging root to image..."
136136
cptofs ${optionalString partitioned "-P 1"} -t ${fsType} -i $diskImage $root/* /

0 commit comments

Comments
 (0)
Please sign in to comment.