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

remove the Channels section #7973

Merged
merged 5 commits into from
Jul 19, 2023
Merged

Conversation

fricklerhandwerk
Copy link
Contributor

@fricklerhandwerk fricklerhandwerk commented Mar 5, 2023

Motivation

this is a how-to guide which should not be in the reference manual. also it does not contain information that is not in the manual page on nix-channel.

additionally, slightly reword the documentation to be more concise and informative.

Context

another step towards #7769

Checklist for maintainers

Priorities

Add 👍 to pull requests you find important.

@edolstra
Copy link
Member

edolstra commented Mar 6, 2023

it also refers to nix-env, which is discouraged for package management, because it behaves surprisingly.

nix-env is not discouraged for package management, so that's not a valid reason for removing this information.

@fricklerhandwerk
Copy link
Contributor Author

fricklerhandwerk commented Mar 6, 2023

I fixed up the wording in the PR description to be more precise. It's of course important to say who's discouraging it and why, and the commit message is a proposal to make that statement authoritatively, and thus make it a valid reason.

@edolstra what's your take on these arguments?

In any case, channels and nix-env -i are non-portable and at some point inevitably confront beginners with surprising behavior, which makes them rework their setups to use Home Manager or NixOS, or give up on Nix. Especially from the Discourse thread I gather that nix-env --set (and rarely nix-env -i) is – apart from beginners who don't know better – only used on systems where proper declarative configs are not possible, and other than that the only reasonable client of that interface are NixOS, HM, and nix-darwin. On top of that, the only reason those even use channels is essentially... as far as I can see no good reason at all, it's probably historical, but still really complicates the entire setup. Here's a very old and lengthy and still on-going discussion which traces the problems involved.

@fricklerhandwerk
Copy link
Contributor Author

fricklerhandwerk commented Apr 5, 2023

Triaged in the Nix team meeting 2023-03-31:

  • @edolstra: We shouldn't rip out material if there's no alternative
  • @fricklerhandwerk: Usage of nix-channel is evident from the man page
    • Also upcoming PR listing all the files that are relevant to Nix would make this much clearer
  • @Ericson2314: We don't want to remove things that don't have a non-experimental alternative, but a lot of people use the (stable) built-in fetchers instead of channels
  • to discuss

@nixos-discourse
Copy link

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

https://discourse.nixos.org/t/2023-03-31-nix-team-meeting-minutes-45/27002/1

doc/manual/src/command-ref/nix-channel.md Outdated Show resolved Hide resolved
Copy link
Member

Choose a reason for hiding this comment

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

Controversy doesn't seem resolved.

Maybe separate out the deletion so that we can merge the other improvements first?

Alternatively, or later, a page on nix.dev could resolve this.

this is a how-to guide which should not be in the reference manual.
it also refers to `nix-env`, which should not be the first thing readers
of the reference manual encounter, as it behaves very differently in
spirit from the rest of Nix.

slightly reword the documentation to be more concise and informative.
Comment on lines +18 to +26

> **Note**
>
> The state of a subscribed channel is external to the Nix expressions relying on it.
> This may limit reproducibility.
>
> Dependencies on other Nix expressions can be declared explicitly with:
> - [`fetchurl`](@docroot@/language/builtins.md#builtins-fetchurl), [`fetchTarball`](@docroot@/language/builtins.md#builtins-fetchTarball), or [`fetchGit`](@docroot@/language/builtins.md#builtins-fetchGit) in Nix expressions
> - the [`-I` option](@docroot@/command-ref/opt-common.md#opt-I) in command line invocations
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Suggested change
> **Note**
>
> The state of a subscribed channel is external to the Nix expressions relying on it.
> This may limit reproducibility.
>
> Dependencies on other Nix expressions can be declared explicitly with:
> - [`fetchurl`](@docroot@/language/builtins.md#builtins-fetchurl), [`fetchTarball`](@docroot@/language/builtins.md#builtins-fetchTarball), or [`fetchGit`](@docroot@/language/builtins.md#builtins-fetchGit) in Nix expressions
> - the [`-I` option](@docroot@/command-ref/opt-common.md#opt-I) in command line invocations

We may or may not want to have this here.

@fricklerhandwerk
Copy link
Contributor Author

At this point all the information from the Channels page is contained in the manual page on nix-channel, therefore I think it can be safely removed. A redirect will be added immediately when this is merged: NixOS/nixos-homepage#1004

@roberth roberth merged commit 32494cb into NixOS:master Jul 19, 2023
fricklerhandwerk added a commit to NixOS/nixos-homepage that referenced this pull request Jul 20, 2023
@fricklerhandwerk fricklerhandwerk deleted the remove-channels branch October 9, 2023 21:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants