nix-channel
manages Nix channel subscriptions
TLDR
SYNOPSIS
nix-channel [options]
DESCRIPTION
nix-channel manages Nix channel subscriptions. Channels are URLs that point to a Nix expression tarball providing a set of packages and NixOS modules.The list of subscribed channels is stored in `~/.nix-channels`. After updating, channel expressions are symlinked from `~/.nix-defexpr/` and become available to `nix-env` and other Nix tools. Nix flakes are the modern alternative to channels.
PARAMETERS
--list
Print names and URLs of all subscribed channels.--add URL [NAME]
Subscribe to a channel. If NAME is omitted, defaults to the last component of the URL with -stable or -unstable suffixes removed.--update [NAMES...]
Download Nix expressions of subscribed channels and make them the default for nix-env operations. Optionally update only the named channels.--remove NAME
Unsubscribe from a channel.--rollback [GENERATION]
Revert the previous call to `--update`. Optionally specify a generation number.--list-generations
Show channel generations.--help
Display help information.--version
Display version information.
CAVEATS
Channels are a legacy approach; Nix flakes are recommended for new projects. Channels are per-user unless configured system-wide on NixOS. Running `--update` requires network access to download channel expressions.
HISTORY
nix-channel has been part of the Nix package manager since its early releases by Eelco Dolstra. It is the traditional mechanism for subscribing to package repositories, predating the flakes system introduced experimentally in Nix 2.4.
SEE ALSO
nix(1), nix-env(1), nix-build(1), nix-shell(1), nixos-rebuild(1)
