aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2015-01-06 11:17:11 +0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2015-01-06 11:17:11 +0100
commit4d5c9d85eab4b50bf865cf4e238a873cb8dd9301 (patch)
treeeb9637ebc910ad7828aee1fc2bc84732845e357f /doc
parentdf05f49dcd49dfeafe7fdb4d2d3517d886bf6df1 (diff)
Document how to set up build users on Mac OS X
Diffstat (limited to 'doc')
-rw-r--r--doc/manual/installation/multi-user.xml28
1 files changed, 28 insertions, 0 deletions
diff --git a/doc/manual/installation/multi-user.xml b/doc/manual/installation/multi-user.xml
index 69ae1ef27..49c4f7235 100644
--- a/doc/manual/installation/multi-user.xml
+++ b/doc/manual/installation/multi-user.xml
@@ -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>