diff options
author | Martin Schwaighofer <mschwaig@users.noreply.github.com> | 2022-04-07 11:28:20 +0200 |
---|---|---|
committer | Martin Schwaighofer <mschwaig@users.noreply.github.com> | 2022-04-08 11:23:54 +0200 |
commit | 4f29cf1a1d906f35054f8b318df7c0d3a9117bb3 (patch) | |
tree | ff165b6850850c7122fac2c99657b0cad41e2aca /scripts | |
parent | f01e33f283f4ff4e04ccdd4c3692c631cb7290b9 (diff) |
installer: ask for confirmation on multi-user install without systemd
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: https://github.com/NixOS/nix/issues/4999#issuecomment-1064188080
This closes #4999 but rejecting it and closing that issue anyways
would also be valid.
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/install-multi-user.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/install-multi-user.sh b/scripts/install-multi-user.sh index 69b6676ea..b79a9c23a 100644 --- a/scripts/install-multi-user.sh +++ b/scripts/install-multi-user.sh @@ -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() { |