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

Fix #116: trusted-users allows running commands as root without password #130

Merged

Conversation

yvan-sraka
Copy link
Contributor

@yvan-sraka yvan-sraka commented Mar 21, 2024

Update README.md to rather suggest user to directly put the extra-substituters in /etc/nix/nix.conf and remove nixConfig attribute from the flake.nix.

Rendered

@yvan-sraka yvan-sraka requested a review from angerman March 21, 2024 13:34
@yvan-sraka yvan-sraka self-assigned this Mar 21, 2024
@yvan-sraka yvan-sraka force-pushed the fix-116-do-not-recommend-to-change-trusted-users-anymore branch from 08109c3 to b06c336 Compare March 21, 2024 13:38
@yvan-sraka
Copy link
Contributor Author

These lines should also be updated:

devx/docs/direnv.md

Lines 25 to 27 in b06c336

If you're not listed, you need to add the line `trusted-users = $USER` in your configuration file. Additionally, two more lines should be added: `experimental-features = nix-command flakes` and `accept-flake-config = true` for the convenince of having flake features enabled globaly.
You should add the `trusted-users` line in `/etc/nix/nix.conf`, others options could be added there or in `$XDG_CONFIG_HOME/nix/nix.conf` if you only want to change the configuration of your current user. After making these edits, remember to restart the `nix-daemon`. If you use a Linux distribution based on `systemd`, you can do so by running `sudo systemctl restart nix-daemon`, if you're running macOS, it's `launchctl kickstart -k system/org.nixos.nix-daemon`.

Copy link
Collaborator

@angerman angerman left a comment

Choose a reason for hiding this comment

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

This is good! Thank you!

@yvan-sraka yvan-sraka marked this pull request as ready for review March 26, 2024 12:53
…sword

Update `README.md` to rather suggest user to directly put the
`extra-substituters` in `/etc/nix/nix.conf` and remove `nixConfig`
attribute from the `flake.nix`.
@yvan-sraka yvan-sraka force-pushed the fix-116-do-not-recommend-to-change-trusted-users-anymore branch from 3eaac40 to f9fe8a5 Compare March 26, 2024 12:56
@yvan-sraka yvan-sraka added this pull request to the merge queue Mar 26, 2024
Merged via the queue into main with commit 6049c0f Mar 26, 2024
67 checks passed
@yvan-sraka yvan-sraka deleted the fix-116-do-not-recommend-to-change-trusted-users-anymore branch March 26, 2024 12:59
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.

trusted-users allows running commands as root without password (in README.md)
2 participants