diff --git a/README.md b/README.md index 02942cd..9b84218 100644 --- a/README.md +++ b/README.md @@ -10,3 +10,7 @@ $ nix-*-linux/install ``` You are in a user chroot where `/` is owned by your user, hence also `/nix` is owned by your user. Everything else is bind mounted from the real root. + +Notes: + +- The nix config is not in `/etc/nix` but in `/nix/etc/nix`, so that you can modify it. This is done with the `NIX_CONF_DIR`, which you can override at any time. diff --git a/main.c b/main.c index 8e6bfff..cc29e7c 100644 --- a/main.c +++ b/main.c @@ -114,6 +114,8 @@ path_buf, path_buf2, strerror(errno)); chdir(cwd); // execute the command + + setenv("NIX_CONF_DIR", "/nix/etc/nix", 1); execvp(argv[2], argv+2); err_exit("execvp"); }