Skip to content

Commit

Permalink
installer: ask for confirmation on multi-user install without systemd
Browse files Browse the repository at this point in the history
On Linux a user can go through all the way through the multi-user install
and find out at the end that they now have to manually configure their
init system to launch the nix daemon.

I suspect that for a significant number of users this is not
what they wanted. They might prefer a single-user install.
Now they have to manually uninstall nix before they can
go through the single-user install.

This introduces a confirmation dialog before the install
in that specific situation to make sure that they want to proceed.

See also: NixOS#4999 (comment)
This closes NixOS#4999 but rejecting it and closing that issue anyways
would also be valid.
  • Loading branch information
mschwaig committed Apr 8, 2022
1 parent f01e33f commit 4f29cf1
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions scripts/install-multi-user.sh
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,18 @@ EOF
fi
done

if [ "$(uname -s)" = "Linux" ] && [ ! -e /run/systemd/system ]; then
warning <<EOF
We did not detect systemd on your system. With a multi-user install
without systemd you will have to manually configure your init system to
launch the Nix daemon after installation.
EOF
if ! ui_confirm "Do you want to proceed with a multi-user installation?"; then
failure <<EOF
You have aborted the installation.
EOF
fi
fi
}

setup_report() {
Expand Down

0 comments on commit 4f29cf1

Please sign in to comment.