aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorDomen Kožar <domen@dev.si>2020-05-25 17:52:58 +0200
committerGitHub <noreply@github.com>2020-05-25 17:52:58 +0200
commitfcf85203cf030f8e239d806ab4253ba77be8be21 (patch)
tree5d8cd1f45ba49c6a8d59ba8f5dc56e8e016f570b /scripts
parent81a0731e05805e92355738685fcc2c4fd74368a2 (diff)
parent573ff8dfcaacc4495e7f7880d86f70145a074578 (diff)
Merge pull request #3623 from domenkozar/installer-pass-nix-conf
Allow passing extra nix.conf to installer
Diffstat (limited to 'scripts')
-rw-r--r--scripts/install-multi-user.sh1
-rw-r--r--scripts/install-nix-from-closure.sh4
2 files changed, 5 insertions, 0 deletions
diff --git a/scripts/install-multi-user.sh b/scripts/install-multi-user.sh
index a0f1deb98..b0cb51943 100644
--- a/scripts/install-multi-user.sh
+++ b/scripts/install-multi-user.sh
@@ -646,6 +646,7 @@ setup_default_profile() {
place_nix_configuration() {
cat <<EOF > "$SCRATCH/nix.conf"
+$NIX_EXTRA_CONF
build-users-group = $NIX_BUILD_GROUP_NAME
EOF
_sudo "to place the default nix daemon configuration (part 2)" \
diff --git a/scripts/install-nix-from-closure.sh b/scripts/install-nix-from-closure.sh
index 72aa5abf5..3e0312c78 100644
--- a/scripts/install-nix-from-closure.sh
+++ b/scripts/install-nix-from-closure.sh
@@ -41,6 +41,7 @@ fi
INSTALL_MODE=no-daemon
CREATE_DARWIN_VOLUME=0
+NIX_EXTRA_CONF=
# handle the command line flags
while [ $# -gt 0 ]; do
case $1 in
@@ -54,6 +55,9 @@ while [ $# -gt 0 ]; do
NIX_INSTALLER_NO_MODIFY_PROFILE=1;;
--darwin-use-unencrypted-nix-store-volume)
CREATE_DARWIN_VOLUME=1;;
+ --nix-extra-conf-file)
+ NIX_EXTRA_CONF=$(cat $2)
+ shift;;
*)
(
echo "Nix Installer [--daemon|--no-daemon] [--no-channel-add] [--no-modify-profile]"