diff options
Diffstat (limited to 'doc/manual/installation/multi-user.xml')
-rw-r--r-- | doc/manual/installation/multi-user.xml | 38 |
1 files changed, 33 insertions, 5 deletions
diff --git a/doc/manual/installation/multi-user.xml b/doc/manual/installation/multi-user.xml index 312f5966452d..49c4f723597e 100644 --- a/doc/manual/installation/multi-user.xml +++ b/doc/manual/installation/multi-user.xml @@ -23,11 +23,11 @@ daemon</emphasis> running under the owner of the Nix store/database that performs the operation.</para> <note><para>Multi-user mode has one important limitation: only -<systemitem class="username">root</systemitem> can run <command -linkend="sec-nix-pull">nix-pull</command> to register the availability -of pre-built binaries. However, those registrations are shared by all -users, so they still get the benefit from <command>nix-pull</command>s -done by <systemitem class="username">root</systemitem>.</para></note> +<systemitem class="username">root</systemitem> and a set of trusted +users specified in <filename>nix.conf</filename> can specify arbitrary +binary caches. So while unprivileged users may install packages from +arbitrary Nix expressions, they may not get pre-built +binaries.</para></note> <simplesect> @@ -52,6 +52,34 @@ This creates 10 build users. There can never be more concurrent builds than the number of build users, so you may want to increase this if you expect to do many builds at the same time.</para> +<para>On Mac OS X, you can create the required group and users by +running the following script: + +<programlisting> +#! /bin/bash -e + +dseditgroup -o create nixbld -q + +gid=$(dscl . -read /Groups/nixbld | awk '($1 == "PrimaryGroupID:") {print $2 }') + +echo "created nixbld group with gid $gid" + +for i in $(seq 1 10); do + user=/Users/nixbld$i + uid="$((30000 + $i))" + dscl . create $user + dscl . create $user RealName "Nix build user $i" + dscl . create $user PrimaryGroupID "$gid" + dscl . create $user UserShell /usr/bin/false + dscl . create $user NFSHomeDirectory /var/empty + dscl . create $user UniqueID "$uid" + dseditgroup -o edit -a nixbld$i -t user nixbld + echo "created nixbld$i user with uid $uid" +done +</programlisting> + +</para> + </simplesect> |