-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move details on channels into the dedicated page
- remove noise from the top of `nix-channel` page replace the long blurb with a short summary of what the command does, link to the details in the dedicated page - slightly reword the descriptions of the files involved for clarity - reorder the sections in the channels page to match the order of interaction: you first subscribe to channels and then store channels contents
- Loading branch information
1 parent
668d63d
commit a7cdc90
Showing
2 changed files
with
34 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,41 @@ | ||
## Channels | ||
|
||
A directory containing symlinks to Nix channels, managed by [`nix-channel`]: | ||
|
||
- `$XDG_STATE_HOME/nix/profiles/channels` for regular users | ||
- `$NIX_STATE_DIR/profiles/per-user/root/channels` for `root` | ||
|
||
[`nix-channel`] uses a [profile](@docroot@/command-ref/files/profiles.md) to store channels. | ||
This profile contains symlinks to the contents of those channels. | ||
Channels are a mechanism for obtaining Nix expressions over the web. | ||
|
||
The moving parts of channels are: | ||
- The official channels listed at <https://nixos.org/channels> | ||
- The user-specific list of [subscribed channels](#subscribed-channels) | ||
- The [downloaded channel contents](#channel-contents) | ||
- The [Nix expression search path](@docroot@/command-ref/conf-file.md#conf-nix-path) | ||
|
||
> **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 for explicitly determining the value of [lookup paths](@docroot@/language/constructs/lookup-path.md) | ||
## Subscribed channels | ||
|
||
The list of subscribed channels is stored in | ||
The list of subscribed channels is stored in a file: | ||
|
||
- `~/.nix-channels` | ||
- `$XDG_STATE_HOME/nix/channels` if [`use-xdg-base-directories`] is set to `true` | ||
- `$XDG_STATE_HOME/nix/channels` if [`use-xdg-base-directories`](@docroot@/command-ref/conf-file.md#conf-use-xdg-base-directories) is set to `true` | ||
|
||
in the following format: | ||
Each line maps a channel name to a URL in the following format: | ||
|
||
``` | ||
<url> <name> | ||
... | ||
``` | ||
|
||
[`nix-channel`]: @docroot@/command-ref/nix-channel.md | ||
[`use-xdg-base-directories`]: @docroot@/command-ref/conf-file.md#conf-use-xdg-base-directories | ||
## Channels contents | ||
|
||
The [`nix-channel`](@docroot@/command-ref/nix-channel.md) command uses a [profile](@docroot@/command-ref/files/profiles.md) to keep track of channels: | ||
|
||
- `$XDG_STATE_HOME/nix/profiles/channels` for regular users | ||
- `$NIX_STATE_DIR/profiles/per-user/root/channels` for `root` | ||
|
||
Each generation of that profile is a directory with symlinks to channel contents. | ||
Each entry in this directory corresponds to the name of a [subscribed channel](#subscribed-channels) at that time. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters