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

Default config causes user to be unable to access the nix registry #131

Closed
crazyminecuber opened this issue Jun 13, 2023 · 6 comments
Closed

Comments

@crazyminecuber
Copy link

First of all, good job with the project! It was easy to get working, some feedback however.

The following line in the example config in the readme

´´´
{ file = "/etc/nix/id_rsa"; parentDirectory = { mode = "u=rwx,g=,o="; }; }

´´´

causes a user running nix flake update to get the error

error: getting status of /etc/nix/registry.json: Permission denied

So I suggest changing the default config to not cause this issue? Or is there a good reason for making /nix private which I am missing?

@nixos-discourse
Copy link

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/nix-does-not-use-etc-nix-nix-conf-anymore/29505/11

@talyz
Copy link
Collaborator

talyz commented Jun 24, 2023

This is not supposed to be a default config, just an example of what's possible to do. It would be good to have a better example, though. Suggestions are welcome!

@crazyminecuber
Copy link
Author

I think the other examples are good, but since the example with /etc/nix/id_rsa seems to break multiple subtle things, I think it should be changed/removed. The other examples show how to set permissions, so I think changing it to just /etc/nix/id_rsa would be fine. I personally have not configured any special permissions for the files field, so I do not have any good examples on hand.

@talyz
Copy link
Collaborator

talyz commented Jun 25, 2023

The thing is that it's the only example showing how to use parentDirectory, so I wouldn't want to just remove it without a replacement. I suppose it could just be a made up secret file, though - that's pretty much what the current one is anyway. Also see #106.

@C0D3-M4513R
Copy link

I just stumbled across this.
I think the nixos wiki for this should be changed and then this can be closed, since the readme in this repo has already been changed.

@talyz
Copy link
Collaborator

talyz commented Jun 17, 2024

Fixed by #151.

@C0D3-M4513R Since the wiki entry isn't official or affiliated with the project, I'm going to close this issue now. Feel free to copy the fix to the wiki or whatever is necessary, though.

@talyz talyz closed this as completed Jun 17, 2024
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

No branches or pull requests

4 participants