Skip to content

Commit 9f75558

Browse files
committed
Install Nix: add mainInstallNix() - invocation of functions
rm old message 'performing ... installation', which was to STDERR btw
1 parent ca02ac4 commit 9f75558

File tree

1 file changed

+41
-1
lines changed

1 file changed

+41
-1
lines changed

scripts/install-nix-from-closure.sh

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -761,10 +761,50 @@ installNix() {
761761
# nix-channel should be fully transactional, so no 'nix-channel --rollback'
762762
"$nix"/bin/nix-channel --update nixpkgs
763763
}
764+
765+
# Wrap function invocations process into function
766+
mainInstallNix() {
767+
768+
# TODO: Determine to write single/multi user after bug #1559 is resolved
769+
notice '
770+
771+
Performing a single-user installation of Nix:
772+
'
773+
774+
if [ ! -d "$dest" ] ; then
775+
createDest
776+
fi
777+
778+
createStore
779+
780+
copyNix
781+
782+
initializeDB
783+
784+
setupProfile
785+
786+
787+
if [ -z "$NIX_SSL_CERT_FILE" ] || [ ! -f "$NIX_SSL_CERT_FILE" ]; then
788+
installCerts
789+
fi
790+
791+
if ! "$nix"/bin/nix-channel --list | grep -q '^nixpkgs '; then
792+
subscribeChannels
793+
fi
794+
795+
if [ -z "$_NIX_INSTALLER_TEST" ]; then
796+
updateRepos
797+
fi
798+
799+
notice '
800+
801+
Installation finished. 8)
802+
'
803+
804+
}
764805
}
765806

766807
}
767-
echo "performing a single-user installation of Nix..." >&2
768808
added=
769809
if [ -z "$NIX_INSTALLER_NO_MODIFY_PROFILE" ]; then
770810

0 commit comments

Comments
 (0)