From f20d572814357ed9eae3f12deaec68687e5bc0cd Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Sat, 9 Dec 2006 00:06:18 +0000 Subject: [PATCH] * Multi-user Nix setup has changed. svn path=/nixos/trunk/; revision=7285 --- boot/boot-stage-2-init.sh | 15 ++++++++++----- boot/boot-stage-2.nix | 3 ++- configuration/boot-environment.nix | 5 ++--- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/boot/boot-stage-2-init.sh b/boot/boot-stage-2-init.sh index e5ab202ea14..df5a399b1aa 100644 --- a/boot/boot-stage-2-init.sh +++ b/boot/boot-stage-2-init.sh @@ -131,21 +131,26 @@ echo "hosts: files dns" > /etc/nsswitch.conf if test -z "@readOnlyRoot@"; then for i in $(seq 1 10); do - account=nix-build-$i + account=nixbld$i if ! userExists $account; then createUser $account x \ - $((i + 30000)) $((i + 30000)) \ + $((i + 30000)) 30000 \ 'Nix build user' /var/empty /noshell fi - accounts="$accounts $account" + accounts="$accounts${accounts:+,}$account" done + if ! grep -q "^nixbld:" /etc/group; then + echo "nixbld:*:30000:$accounts" >> /etc/group + fi + mkdir -p /nix/etc/nix cat > /nix/etc/nix/nix.conf <