Nix Installation Guide: Difference between revisions
imported>Mic92 nix 2.0 variant is useless unless nix is already installed. |
imported>Mic92 nix-user-chroot + sandbox don't compose |
||
Line 41: | Line 41: | ||
=== nix-user-chroot === | === nix-user-chroot === | ||
[https://github.com/lethalman/nix-user-chroot nix-user-chroot] is the preferred method to install use nix on systems without <code>/nix</code>. It also requires user namespaces to be enabled on the system. | [https://github.com/lethalman/nix-user-chroot nix-user-chroot] is the preferred method to install use nix on systems without <code>/nix</code>. It also requires user namespaces to be enabled on the system. | ||
<code>nix-user-chroot</code> will create an environment in which you can bind mount an directory to <code>/nix</code>. | <code>nix-user-chroot</code> will create an environment in which you can bind mount an directory to <code>/nix</code>. | ||
The mountpoint will be only visible within this environment. | The mountpoint will be only visible within this environment. | ||
Line 56: | Line 56: | ||
<code>nix-user-chroot</code> can now be used to install Nix. | <code>nix-user-chroot</code> can now be used to install Nix. | ||
In this example, the Nix store will be installed to <code>~/.nix</code>: | In this example, the Nix store will be installed to <code>~/.nix</code>. | ||
This method will also require to deactivate the build sandbox of nix, since | |||
creating a nested sandbox is not supported: | |||
<syntaxHighlight lang="console"> | |||
$ cat ~/.config/nix/nix.conf | |||
sandbox = false | |||
</syntaxHighlight> | |||
<syntaxHighlight lang="console"> | <syntaxHighlight lang="console"> |