nix-user-chroot/README.md

13 lines
420 B
Markdown
Raw Normal View History

2015-06-24 19:07:09 +03:00
Run nix as user in a lightweight chrooted container.
2015-06-24 19:41:43 +03:00
```
$ 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
```
2015-06-24 19:07:09 +03:00
2015-06-24 19:41:43 +03:00
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.