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

Run brew as regular user instead of as root #1110

Closed
wants to merge 1 commit into from
Closed

Conversation

Neved4
Copy link

@Neved4 Neved4 commented Oct 21, 2024

Fixes #1047

This makes brew run commands as a normal user, dropping privileges and avoiding brew errors, see: #1047 (comment).

Note: Would appreciate guidance if there's a better way to write this using Nix, or if the current way is correct in the context of nix-darwin.

@emilazy
Copy link
Collaborator

emilazy commented Oct 21, 2024

This is already part of the per‐user activation scripts. You’re probably running sudo darwin-rebuild, which is not supported (although it will be supported once user activation is removed and then you’ll have to specify the user to run Homebrew as).

@Neved4
Copy link
Author

Neved4 commented Oct 21, 2024

@emilazy Thx Emily! I suggest closing this one and #1047 until it's supported, cheers 💙

@emilazy
Copy link
Collaborator

emilazy commented Oct 21, 2024

Looks like the non‐sudo part of #1047 may be an actual bug (that I don’t understand the cause of).

FWIW, here is the draft of The Plan™ around user activation: #1016 (comment). I am focused on the Nixpkgs 24.11 release right now but hopefully there will be movement on it after that.

Thanks for the contribution in any case! We will hopefully match NixOS better here soon; sudo darwin-rebuild switch should be the way to go.

@emilazy emilazy closed this Oct 21, 2024
@Neved4
Copy link
Author

Neved4 commented Oct 21, 2024

Thank you!

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.

Cannot use system.defaults when running darwin-rebuild switch as non-root user
2 participants