From 8a93b5a55184d9d34effdd94d58429c9ad1a3d14 Mon Sep 17 00:00:00 2001 From: Alexander Bantyev Date: Fri, 17 Feb 2023 21:57:15 +0400 Subject: Document user files of nix --- doc/manual/src/command-ref/nix-channel.md | 31 ++++--------------------------- 1 file changed, 4 insertions(+), 27 deletions(-) (limited to 'doc/manual/src/command-ref/nix-channel.md') 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 {}).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”. -- cgit v1.2.3 From 7770d82240ffecabf0022aee21e2ba62b6d11876 Mon Sep 17 00:00:00 2001 From: Valentin Gagarin Date: Wed, 26 Apr 2023 11:01:12 +0200 Subject: fix typos and wording --- doc/manual/src/command-ref/nix-channel.md | 1 - 1 file changed, 1 deletion(-) (limited to 'doc/manual/src/command-ref/nix-channel.md') diff --git a/doc/manual/src/command-ref/nix-channel.md b/doc/manual/src/command-ref/nix-channel.md index 9f7246661..72d3e422b 100644 --- a/doc/manual/src/command-ref/nix-channel.md +++ b/doc/manual/src/command-ref/nix-channel.md @@ -52,7 +52,6 @@ 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: -- cgit v1.2.3