table of contents
NIX-CHANNEL(1) | Command Reference | NIX-CHANNEL(1) |
NAME¶
nix-channel - manage Nix channels
SYNOPSIS¶
nix-channel {--add url [name] | --remove name | --list | --update [names...] | --rollback [generation] }
DESCRIPTION¶
A Nix channel is a mechanism that allows you to automatically stay up-to-date with a set of pre-built Nix expressions. A Nix channel is just a URL that points to a place containing a set of Nix expressions.
This command has the following operations:
--add url [name]
--remove name
--list
--update [names...]
--rollback [generation]
Note that --add does not automatically perform an update.
The list of subscribed channels is stored in ~/.nix-channels.
EXAMPLES¶
To subscribe to the Nixpkgs channel and install the GNU Hello package:
$ nix-channel --add https://nixos.org/channels/nixpkgs-unstable $ nix-channel --update $ nix-env -iA nixpkgs.hello
You can revert channel updates using --rollback:
$ nix-instantiate --eval -E '(import <nixpkgs> {}).lib.nixpkgsVersion' "14.04.527.0e935f1" $ nix-channel --rollback switching from generation 483 to 482 $ nix-instantiate --eval -E '(import <nixpkgs> {}).lib.nixpkgsVersion' "14.04.526.dbadfad"
FILES¶
/nix/var/nix/profiles/per-user/username/channels
~/.nix-defexpr/channels
CHANNEL FORMAT¶
A channel URL should point to a directory containing the following files:
nixexprs.tar.xz
AUTHOR¶
Eelco Dolstra
COPYRIGHT¶
Copyright © 2004-2018 Eelco Dolstra
12/12/2020 | Nix 2.3.7 |