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

darwin-rebuild should use sudo -H instead of sudo to work around Nix warning #481

Closed
lilyball opened this issue Jul 24, 2022 · 0 comments · Fixed by #509
Closed

darwin-rebuild should use sudo -H instead of sudo to work around Nix warning #481

lilyball opened this issue Jul 24, 2022 · 0 comments · Fixed by #509

Comments

@lilyball
Copy link
Contributor

Nix 2.10 has started printing a warning whenever the current user doesn't own $HOME, which is the case on macOS when running sudo nix because macOS sudo doesn't reset $HOME by default. darwin-rebuild is currently running sudo nix-env -p "$profile" --set "$systemConfig". This command shouldn't care about $HOME1 and yet it now triggers a warning. It would be nice to avoid the warning.

Footnotes

  1. In theory $HOME can affect it through per-user nix.conf files but that seems rather niche.

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.

1 participant