Better installation instructions

This commit is contained in:
Luca Bruno 2015-06-24 18:41:43 +02:00
parent d5a9a63e93
commit 3b2a590f7d

View File

@ -1,6 +1,12 @@
Run nix as user in a lightweight chrooted container.
1. Create an empty directory somewhere, `mkdir $DIR`
2. Run `nix-user-chroot $DIR bash` as user
```
$ mkdir $ROOT
$ nix-user-chroot $ROOT bash
$ download and extract latest nix binary tarball
$ mkdir -m 0755 /nix && chown $(whoami) /nix
$ mkdir -p /nix/var/nix/profiles/per-user/luca
$ nix-*-linux/install
```
You are now in a chroot where `/` is owned by your user, hence you can now install nix under `/nix` as user and run nix commands.
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.