summary refs log tree commit diff
path: root/src/libmain
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2008-10-29 15:34:48 +0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2008-10-29 15:34:48 +0000
commit709b55ee0281bc2d587dff6f60ec189b010800f6 (patch)
tree18285f86f7247c8ee638598daad8e5b5b2387f26 /src/libmain
parentc98ea254dcb6384b686a88657fd800ad7655e4a5 (diff)
downloadguix-709b55ee0281bc2d587dff6f60ec189b010800f6.tar.gz
* Put the chroots under /nix/var/nix/chroots to reduce the risk of
  disasters involving `rm -rf' on bind mounts.  Will try the
  definitive fix (per-process mounts, apparently possible via the
  CLONE_NEWNS flag in clone()) some other time.

Diffstat (limited to 'src/libmain')
-rw-r--r--src/libmain/shared.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libmain/shared.cc b/src/libmain/shared.cc
index fd16dece7d..4725d1ed10 100644
--- a/src/libmain/shared.cc
+++ b/src/libmain/shared.cc
@@ -138,6 +138,7 @@ static void initAndRun(int argc, char * * argv)
     nixConfDir = canonPath(getEnv("NIX_CONF_DIR", NIX_CONF_DIR));
     nixLibexecDir = canonPath(getEnv("NIX_LIBEXEC_DIR", NIX_LIBEXEC_DIR));
     nixBinDir = canonPath(getEnv("NIX_BIN_DIR", NIX_BIN_DIR));
+    nixChrootsDir = canonPath(getEnv("NIX_CHROOTS_DIR", nixStateDir + "/chroots"));
 
     string subs = getEnv("NIX_SUBSTITUTERS", "default");
     if (subs == "default") {