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

Provide users a better error message if systemd is not active #412

Merged
merged 4 commits into from
Apr 10, 2023

Conversation

Hoverbear
Copy link
Contributor

Description

Fixes #392:

The error:

systemd was not active.

On WSL2, systemd is not enabled by default. Consider enabling it by adding it to your `/etc/wsl.conf` with `echo -e '[boot]\nsystemd=true'` then restarting WSL2 with `wsl.exe --shutdown` and re-entering the WSL shell. For more information, see https://devblogs.microsoft.com/commandline/systemd-support-is-now-available-in-wsl/.

If it will be started later consider, passing `--no-start-daemon`.

To use a `root`-only Nix install, consider passing `--init none`.
Checklist
  • Formatted with cargo fmt
  • Built with nix build
  • Ran flake checks with nix flake check
  • Added or updated relevant tests (leave unchecked if not applicable)
  • Added or updated relevant documentation (leave unchecked if not applicable)
  • Linked to related issues (leave unchecked if not applicable)
Validating with install.determinate.systems

If a maintainer has added the upload to s3 label to this PR, it will become available for installation via install.determinate.systems:

curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix/pr/$PR_NUMBER | sh -s -- install

@Hoverbear Hoverbear added this to the v0.7.1 milestone Apr 10, 2023
@Hoverbear Hoverbear requested a review from cole-h April 10, 2023 19:38
@Hoverbear Hoverbear self-assigned this Apr 10, 2023
@Hoverbear Hoverbear marked this pull request as ready for review April 10, 2023 20:04
@Hoverbear Hoverbear merged commit 75627bc into main Apr 10, 2023
@Hoverbear Hoverbear deleted the better-message-when-systemd-not-active branch April 10, 2023 23:16
@pingiun
Copy link

pingiun commented Apr 11, 2023

Seems like a good message to me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Getting error when running on WSL system without systemd
3 participants