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

Improve detection of WSL installs without Systemd #462

Closed
pingiun opened this issue May 12, 2023 · 5 comments · Fixed by #469
Closed

Improve detection of WSL installs without Systemd #462

pingiun opened this issue May 12, 2023 · 5 comments · Fixed by #469
Milestone

Comments

@pingiun
Copy link

pingiun commented May 12, 2023

I used the installer on a fresh WSL installation of Ubuntu. The installer seems to run fine, however when I want to use a nix run command afterwards, I get the following error:

error: could not set permissions on '/nix/var/nix/profiles/per-user' to 755: Operation not permitted

I have not configured WSL to use systemd but the installer did say "INFO Step: Configure Nix daemon related settings with systemd". This may be related to an issue I filed earlier about not detecting systemd correctly?

@pingiun
Copy link
Author

pingiun commented May 12, 2023

Just to be clear, I tried this:

sudo chmod 755 /nix/var/nix/profiles/per-user

Which didn't fix the issue, it still gives the same error

@pingiun
Copy link
Author

pingiun commented May 12, 2023

I setup systemd in /etc/wsl.conf, rebooted, reinstalled nix and now the issue is gone

@Hoverbear
Copy link
Contributor

I'm glad you got it! Perhaps we should do more validation of WSL environments in our planner...

@Hoverbear Hoverbear changed the title New install on WSL: could not set permissions on '/nix/var/nix/profiles/per-user' Improve detection of WSL installs without Systemd May 12, 2023
@Hoverbear Hoverbear added this to the 0.8.1 milestone May 12, 2023
@Hoverbear
Copy link
Contributor

Related to #336

@Hoverbear
Copy link
Contributor

image
Confirming this issue. I think the solution in https://github.com/DeterminateSystems/nix-installer/pull/336/files#r1153191998 is probably right.

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 a pull request may close this issue.

2 participants