nixos-install: Assume the build user group is "nixbld"

The build user group is always "nixbld", so no need to detect it.
This commit is contained in:
Eelco Dolstra 2014-05-08 23:22:21 +02:00
parent 171d43ba4f
commit 22f102cbdc

View File

@ -97,12 +97,7 @@ mkdir -m 0755 -p \
$mountPoint/nix/var/log/nix/drvs
mkdir -m 1775 -p $mountPoint/nix/store
build_users_group=$(@perl@/bin/perl -I @nix@/lib/perl5/site_perl/*/* -e 'use Nix::Config; Nix::Config::readConfig; print $Nix::Config::config{"build-users-group"};')
if test -n "$build_users_group"; then
chown root:"$build_users_group" $mountPoint/nix/store
else
chown root $mountPoint/nix/store
fi
chown root:nixbld $mountPoint/nix/store
# Get the store paths to copy from the references graph.
@ -130,9 +125,7 @@ unset NIX_REMOTE
# Create a temporary Nix config file that causes the nixbld users to
# be used.
if test -n "$build_users_group"; then
echo "build-users-group = $build_users_group" > $mountPoint/tmp/nix.conf
fi
echo "build-users-group = nixbld" > $mountPoint/tmp/nix.conf # FIXME: remove in Nix 1.8
binary_caches=$(@perl@/bin/perl -I @nix@/lib/perl5/site_perl/*/* -e 'use Nix::Config; Nix::Config::readConfig; print $Nix::Config::config{"binary-caches"};')
if test -n "$binary_caches"; then
echo "binary-caches = $binary_caches" >> $mountPoint/tmp/nix.conf