summary refs log tree commit diff
path: root/nixos/lib
diff options
context:
space:
mode:
authorTuomas Tynkkynen <tuomas.tynkkynen@iki.fi>2017-12-17 00:26:51 +0200
committerTuomas Tynkkynen <tuomas@tuxera.com>2017-12-20 17:28:46 +0200
commit758b4c1ea4db81efcaf4cd8fb5ce04c1b42a991f (patch)
treef83d3ab4a1b29a8114e223b32ed84bfdb199b9a7 /nixos/lib
parent3c82e6fc82003b0eea4d1c2664eb89c68312d4f7 (diff)
downloadnixlib-758b4c1ea4db81efcaf4cd8fb5ce04c1b42a991f.tar
nixlib-758b4c1ea4db81efcaf4cd8fb5ce04c1b42a991f.tar.gz
nixlib-758b4c1ea4db81efcaf4cd8fb5ce04c1b42a991f.tar.bz2
nixlib-758b4c1ea4db81efcaf4cd8fb5ce04c1b42a991f.tar.lz
nixlib-758b4c1ea4db81efcaf4cd8fb5ce04c1b42a991f.tar.xz
nixlib-758b4c1ea4db81efcaf4cd8fb5ce04c1b42a991f.tar.zst
nixlib-758b4c1ea4db81efcaf4cd8fb5ce04c1b42a991f.zip
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...
Diffstat (limited to 'nixos/lib')
-rw-r--r--nixos/lib/make-disk-image.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/lib/make-disk-image.nix b/nixos/lib/make-disk-image.nix
index b12cf68fd36d..636d0223fb77 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/* /