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

list also channels created by root #3381

Closed
wants to merge 1 commit into from

Conversation

contrun
Copy link
Contributor

@contrun contrun commented Mar 1, 2020

Closes #2980

@edolstra
Copy link
Member

I'm not sure we should do this, for a couple of reasons:

  • Channels are basically deprecated, so it's probably better not to change their behaviour at this point.
  • It could be confusing that nix-channel silently merges different channel lists. (Cf nix flake list, which shows you whether a flake comes from the global, local or user registries.)
  • If I read this correctly, it causes commands like nix-channel --add to merge the contents of the user and root channels and rewrite both to have the same contents. That doesn't seem right.

@contrun
Copy link
Contributor Author

contrun commented Mar 13, 2020

Thanks for the comments. My method is indeed ad hoc.

Only when running by the root user, it writes the channel information of the root user to /nix/store/profiles/per-user/root/nix-channels. This way ordinary users can obtain the channel information of root. The channel information of ordinary users are not written to /nix/store/profiles/per-user/root/nix-channels.

Now that channels are being deprecated, feel free to close this PR. Or if improvement on this commit is desirable, I can add a --root flag to the list operation.

@stale
Copy link

stale bot commented Feb 13, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the stale label Feb 13, 2021
@contrun contrun closed this Feb 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make nix-channel --list show inherited channels
2 participants