build-fhs-{chroot,user}env: document new extra bind mounts option
This commit is contained in:
parent
8fbe500fb6
commit
fa53fbe086
@ -236,6 +236,20 @@ c = lib.makeOverridable f { a = 1; b = 2; }</programlisting>
|
|||||||
<literal>runScript</literal> parameter, which is a command that would be
|
<literal>runScript</literal> parameter, which is a command that would be
|
||||||
executed inside the sandbox and passed all the command line arguments. It
|
executed inside the sandbox and passed all the command line arguments. It
|
||||||
default to <literal>bash</literal>.
|
default to <literal>bash</literal>.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
It also uses <literal>CHROOTENV_EXTRA_BINDS</literal> environment variable
|
||||||
|
for binding extra directories in the sandbox to outside places. The format of
|
||||||
|
the variable is <literal>/mnt=test-mnt:/data</literal>, where
|
||||||
|
<literal>/mnt</literal> would be mounted as <literal>/test-mnt</literal>
|
||||||
|
and <literal>/data</literal> would be mounted as <literal>/data</literal>.
|
||||||
|
<literal>extraBindMounts</literal> array argument to
|
||||||
|
<function>buildFHSUserEnv</function> function is prepended to this variable.
|
||||||
|
Latter entries take priority if defined several times -- i.e. in case of
|
||||||
|
<literal>/data=data1:/data=data2</literal> the actual bind path would be
|
||||||
|
<literal>/data2</literal>.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
One can create a simple environment using a <literal>shell.nix</literal>
|
One can create a simple environment using a <literal>shell.nix</literal>
|
||||||
like that:
|
like that:
|
||||||
</para>
|
</para>
|
||||||
|
Loading…
Reference in New Issue
Block a user