Set NIX_CONF_DIR to /nix/etc/nix

This commit is contained in:
Luca Bruno 2015-06-24 18:43:25 +02:00
parent 3b2a590f7d
commit 4e6c9d6d84
2 changed files with 6 additions and 0 deletions

View File

@ -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.

2
main.c
View File

@ -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");
}