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:
parent
171d43ba4f
commit
22f102cbdc
@ -97,12 +97,7 @@ mkdir -m 0755 -p \
|
|||||||
$mountPoint/nix/var/log/nix/drvs
|
$mountPoint/nix/var/log/nix/drvs
|
||||||
|
|
||||||
mkdir -m 1775 -p $mountPoint/nix/store
|
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"};')
|
chown root:nixbld $mountPoint/nix/store
|
||||||
if test -n "$build_users_group"; then
|
|
||||||
chown root:"$build_users_group" $mountPoint/nix/store
|
|
||||||
else
|
|
||||||
chown root $mountPoint/nix/store
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
# Get the store paths to copy from the references graph.
|
# 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
|
# Create a temporary Nix config file that causes the nixbld users to
|
||||||
# be used.
|
# be used.
|
||||||
if test -n "$build_users_group"; then
|
echo "build-users-group = nixbld" > $mountPoint/tmp/nix.conf # FIXME: remove in Nix 1.8
|
||||||
echo "build-users-group = $build_users_group" > $mountPoint/tmp/nix.conf
|
|
||||||
fi
|
|
||||||
binary_caches=$(@perl@/bin/perl -I @nix@/lib/perl5/site_perl/*/* -e 'use Nix::Config; Nix::Config::readConfig; print $Nix::Config::config{"binary-caches"};')
|
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
|
if test -n "$binary_caches"; then
|
||||||
echo "binary-caches = $binary_caches" >> $mountPoint/tmp/nix.conf
|
echo "binary-caches = $binary_caches" >> $mountPoint/tmp/nix.conf
|
||||||
|
Loading…
x
Reference in New Issue
Block a user