aboutsummaryrefslogtreecommitdiff
path: root/doc/manual/src/command-ref/nix-channel.md
diff options
context:
space:
mode:
Diffstat (limited to 'doc/manual/src/command-ref/nix-channel.md')
-rw-r--r--doc/manual/src/command-ref/nix-channel.md12
1 files changed, 9 insertions, 3 deletions
diff --git a/doc/manual/src/command-ref/nix-channel.md b/doc/manual/src/command-ref/nix-channel.md
index 72d3e422b..a210583ae 100644
--- a/doc/manual/src/command-ref/nix-channel.md
+++ b/doc/manual/src/command-ref/nix-channel.md
@@ -52,6 +52,12 @@ The list of subscribed channels is stored in `~/.nix-channels`.
{{#include ./env-common.md}}
+# Files
+
+`nix-channel` operates on the following files.
+
+{{#include ./files/channels.md}}
+
# Examples
To subscribe to the Nixpkgs channel and install the GNU Hello package:
@@ -59,18 +65,18 @@ To subscribe to the Nixpkgs channel and install the GNU Hello package:
```console
$ nix-channel --add https://nixos.org/channels/nixpkgs-unstable
$ nix-channel --update
-$ nix-env -iA nixpkgs.hello
+$ nix-env --install --attr nixpkgs.hello
```
You can revert channel updates using `--rollback`:
```console
-$ nix-instantiate --eval -E '(import <nixpkgs> {}).lib.version'
+$ nix-instantiate --eval --expr '(import <nixpkgs> {}).lib.version'
"14.04.527.0e935f1"
$ nix-channel --rollback
switching from generation 483 to 482
-$ nix-instantiate --eval -E '(import <nixpkgs> {}).lib.version'
+$ nix-instantiate --eval --expr '(import <nixpkgs> {}).lib.version'
"14.04.526.dbadfad"
```