mirror of
https://github.com/lucabrunox/nix-user-chroot.git
synced 2024-09-17 13:49:17 +03:00
Better installation instructions
This commit is contained in:
parent
d5a9a63e93
commit
3b2a590f7d
12
README.md
12
README.md
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user