Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

install-multi-user: Detect and fail lack of systemd separately #2745

Merged
merged 1 commit into from Aug 28, 2019

Conversation

samueldr
Copy link
Member

@samueldr samueldr commented Mar 27, 2019

Otherwise, the user is shown:

Sorry, I don't know what to do on Linux

Which is... not exactly right.


See

cc @grahamc install script afficionado.

Otherwise, the user is shown:

```
Sorry, I don't know what to do on Linux
```

Which is... not exactly right.
# shellcheck source=./install-systemd-multi-user.sh
. "$EXTRACTED_NIX_PATH/install-systemd-multi-user.sh"
else
failure "Sorry, the multi-user installation requires systemd on Linux (detected using /run/systemd/system)"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer saying «requires systemd on Linux, or manual installation of the Nix daemon» — multi-user Nix with daemon and sandboxing works perfectly without systemd after initial setup, and this message can be misunderstood to imply otherwise.

Actually, the part that needs systemd — starting nix-daemon — is the easy part, and build user creation is the more complicated and annoying part, so it would be nice to have an option to do the entire multi-user install except the systemd part, but that's definitely out of scope.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree. @grahamc any other opinion to make the best error message? It needs to

  • Explain why it failed (systemd missing) which is almost fine.
  • What alternatives there are.
Sorry, the multi-user installation requires systemd on Linux, or manual installation of the Nix daemon.
The lack of systemd was detected by missing the /run/systemd/system directory.
Nix can be configured manually to work in multi-user mode with other init systems. [???]

Though, I'm unsure we have the required documentation to refer the user to.


Additionally, if we want to start breaking out the other "annoying parts" as you describe, it might be a good starting point, install.sh --daemon --without-init could use everything not related to systemd, allowing a bit more agnosticism in the installation, declaring that "yes, continue without init configuration support". (Though, all of this into another feature request.)

@grahamc grahamc added this to the Nix 2.3 milestone Aug 27, 2019
@edolstra edolstra merged commit ad03159 into NixOS:master Aug 28, 2019
@samueldr samueldr deleted the install/detect-systemd-separately branch August 28, 2019 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants