aboutsummaryrefslogtreecommitdiff
path: root/doc/manual/src/command-ref/nix-channel.md
diff options
context:
space:
mode:
authorAlexander Bantyev <balsoft@balsoft.ru>2023-02-17 21:57:15 +0400
committerValentin Gagarin <valentin.gagarin@tweag.io>2023-04-26 15:38:19 +0200
commit8a93b5a55184d9d34effdd94d58429c9ad1a3d14 (patch)
treeae9c3c09d3dd321129cd1db4ab378e2f196bef57 /doc/manual/src/command-ref/nix-channel.md
parent946fd29422361e8478425d6aaf9ccae23d7ddffb (diff)
Document user files of nix
Diffstat (limited to 'doc/manual/src/command-ref/nix-channel.md')
-rw-r--r--doc/manual/src/command-ref/nix-channel.md31
1 files changed, 4 insertions, 27 deletions
diff --git a/doc/manual/src/command-ref/nix-channel.md b/doc/manual/src/command-ref/nix-channel.md
index 2027cc98d..9f7246661 100644
--- a/doc/manual/src/command-ref/nix-channel.md
+++ b/doc/manual/src/command-ref/nix-channel.md
@@ -22,6 +22,9 @@ This command has the following operations:
channels. If *name* is omitted, it defaults to the last component of
*url*, with the suffixes `-stable` or `-unstable` removed.
+ A channel URL must point to a directory containing a file `nixexprs.tar.gz`.
+ At the top level, that tarball must contain a single directory with a `default.nix` file that serves as the channel’s entry point.
+
- `--remove` *name*\
Removes the channel named *name* from the list of subscribed
channels.
@@ -49,6 +52,7 @@ The list of subscribed channels is stored in `~/.nix-channels`.
{{#include ./env-common.md}}
+
# Examples
To subscribe to the Nixpkgs channel and install the GNU Hello package:
@@ -71,30 +75,3 @@ switching from generation 483 to 482
$ nix-instantiate --eval -E '(import <nixpkgs> {}).lib.version'
"14.04.526.dbadfad"
```
-
-# Files
-
- - `${XDG_STATE_HOME-$HOME/.local/state}/nix/profiles/channels`\
- `nix-channel` uses a `nix-env` profile to keep track of previous
- versions of the subscribed channels. Every time you run `nix-channel
- --update`, a new channel generation (that is, a symlink to the
- channel Nix expressions in the Nix store) is created. This enables
- `nix-channel --rollback` to revert to previous versions.
-
- - `~/.nix-defexpr/channels`\
- This is a symlink to
- `${XDG_STATE_HOME-$HOME/.local/state}/nix/profiles/channels`. It ensures that
- `nix-env` can find your channels. In a multi-user installation, you
- may also have `~/.nix-defexpr/channels_root`, which links to the
- channels of the root user.
-
-# Channel format
-
-A channel URL should point to a directory containing the following
-files:
-
- - `nixexprs.tar.xz`\
- A tarball containing Nix expressions and files referenced by them
- (such as build scripts and patches). At the top level, the tarball
- should contain a single directory. That directory must contain a
- file `default.nix` that serves as the channel’s “entry point”.