aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorDomen Kožar <domen@dev.si>2020-05-25 17:53:24 +0200
committerGitHub <noreply@github.com>2020-05-25 17:53:24 +0200
commit909bdfb4b4208a65639ebe6548d37ba56fcd5353 (patch)
tree0edb259f5234aafdb9cf5a978dc0d1858428524e /scripts
parentfcf85203cf030f8e239d806ab4253ba77be8be21 (diff)
parent90b0c630a0e9e66f69f1d24b538982c20b5486b9 (diff)
Merge pull request #3375 from domenkozar/multi-user-count
install-multi-user: allow overriding user count
Diffstat (limited to 'scripts')
-rw-r--r--scripts/install-multi-user.sh4
-rw-r--r--scripts/install-nix-from-closure.sh3
2 files changed, 6 insertions, 1 deletions
diff --git a/scripts/install-multi-user.sh b/scripts/install-multi-user.sh
index b0cb51943..74cc6a5b0 100644
--- a/scripts/install-multi-user.sh
+++ b/scripts/install-multi-user.sh
@@ -20,7 +20,9 @@ readonly GREEN='\033[32m'
readonly GREEN_UL='\033[4;32m'
readonly RED='\033[31m'
-readonly NIX_USER_COUNT="32"
+# installer allows overriding build user count to speed up installation
+# as creating each user takes non-trivial amount of time on macos
+readonly NIX_USER_COUNT=${NIX_USER_COUNT:-32}
readonly NIX_BUILD_GROUP_ID="30000"
readonly NIX_BUILD_GROUP_NAME="nixbld"
readonly NIX_FIRST_BUILD_UID="30001"
diff --git a/scripts/install-nix-from-closure.sh b/scripts/install-nix-from-closure.sh
index 3e0312c78..635aaa16d 100644
--- a/scripts/install-nix-from-closure.sh
+++ b/scripts/install-nix-from-closure.sh
@@ -51,6 +51,9 @@ while [ $# -gt 0 ]; do
INSTALL_MODE=no-daemon;;
--no-channel-add)
NIX_INSTALLER_NO_CHANNEL_ADD=1;;
+ --daemon-user-count)
+ NIX_USER_COUNT=$2
+ shift;;
--no-modify-profile)
NIX_INSTALLER_NO_MODIFY_PROFILE=1;;
--darwin-use-unencrypted-nix-store-volume)