From 99623e9940c7593e9da1c3db8c74d8aad4ff3b5f Mon Sep 17 00:00:00 2001 From: Shea Levy Date: Mon, 4 Feb 2013 09:27:56 -0500 Subject: [PATCH] nixos-install: If NIX_CONF_DIR is unset, use /etc/nix --- modules/installer/tools/nixos-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/installer/tools/nixos-install.sh b/modules/installer/tools/nixos-install.sh index 73afc4d2f64..714c229b606 100644 --- a/modules/installer/tools/nixos-install.sh +++ b/modules/installer/tools/nixos-install.sh @@ -85,7 +85,7 @@ mkdir -m 0755 -p \ $mountPoint/nix/var/log/nix/drvs mkdir -m 1775 -p $mountPoint/nix/store -build_users_group=$((grep build-users-group "$NIX_CONF_DIR/nix.conf" 2>/dev/null | awk '{ print $3 }') || echo -n "") +build_users_group=$((grep build-users-group "${NIX_CONF_DIR:-/etc/nix}/nix.conf" 2>/dev/null | awk '{ print $3 }') || echo -n "") if test -n "$build_users_group"; then chown root:"$build_users_group" $mountPoint/nix/store else @@ -117,7 +117,7 @@ export LC_TIME= if test -n "$build_users_group"; then echo "build-users-group = $build_users_group" > $mountPoint/tmp/nix.conf fi -grep binary-caches "$NIX_CONF_DIR/nix.conf" >> $mountPoint/tmp/nix.conf || true +grep binary-caches "${NIX_CONF_DIR:-/etc/nix}/nix.conf" >> $mountPoint/tmp/nix.conf || true export NIX_CONF_DIR=/tmp