Skip to content

Commit

Permalink
Default to single-user install
Browse files Browse the repository at this point in the history
  • Loading branch information
grahamc committed Sep 1, 2018
1 parent c3e508d commit 51f9682
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions scripts/install-nix-from-closure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,14 @@ if [ "$(uname -s)" = "Darwin" ]; then
fi
fi

# Determine if we should punt to the single-user installer or not
# Determine if we could use the multi-user installer or not
if [ "$(uname -s)" = "Darwin" ]; then
INSTALL_MODE=daemon
echo "Note: a multi-user installation is possible. See https://nixos.org/nix/manual/#sect-multi-user-installation" >&2
elif [ "$(uname -s)" = "Linux" ] && [ -e /run/systemd/system ]; then
INSTALL_MODE=daemon
else
INSTALL_MODE=no-daemon
echo "Note: a multi-user installation is possible. See https://nixos.org/nix/manual/#sect-multi-user-installation" >&2
fi

INSTALL_MODE=no-daemon
# Trivially handle the --daemon / --no-daemon options
if [ "x${1:-}" = "x--no-daemon" ]; then
INSTALL_MODE=no-daemon
Expand All @@ -47,14 +46,18 @@ elif [ "x${1:-}" = "x--daemon" ]; then
elif [ "x${1:-}" != "x" ]; then
(
echo "Nix Installer [--daemon|--no-daemon]"

echo "Choose installation method."
echo ""
echo " --daemon: Force the installer to use the Daemon"
echo " based installer, even though it may not"
echo " work."
echo " --daemon: Installs and configures a background daemon that manages the store,"
echo " providing multi-user support and better isolation for local builds."
echo " Both for security and reproducibility, this method is recommended if"
echo " supported on your platform."
echo " See https://nixos.org/nix/manual/#sect-multi-user-installation"
echo ""
echo " --no-daemon: Force a no-daemon, single-user"
echo " installation even when the preferred"
echo " method is with the daemon."
echo " --no-daemon: Simple, single-user installation that does not require root and is"
echo " trivial to uninstall."
echo " (default)"
echo ""
) >&2
exit
Expand Down

0 comments on commit 51f9682

Please sign in to comment.