mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-28 14:22:50 +03:00
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
|
||||
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user