about summary refs log tree commit diff
path: root/doc/manual/nix-channel.xml
blob: 024add8601e8c4d10ea26fd0f7943c1e907556c2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<refentry xmlns="http://docbook.org/ns/docbook"
          xmlns:xlink="http://www.w3.org/1999/xlink"
          xmlns:xi="http://www.w3.org/2001/XInclude"
          xml:id="sec-nix-channel">
  
<refmeta>
  <refentrytitle>nix-channel</refentrytitle>
  <manvolnum>1</manvolnum>
  <refmiscinfo class="source">Nix</refmiscinfo>
  <refmiscinfo class="version"><xi:include href="version.txt" parse="text"/></refmiscinfo>
</refmeta>

<refnamediv>
  <refname>nix-channel</refname>
  <refpurpose>manage Nix channels</refpurpose>
</refnamediv>

<refsynopsisdiv>
  <cmdsynopsis>
    <command>nix-channel</command>
    <group choice='req'>
      <arg choice='plain'><option>--add</option> <replaceable>url</replaceable></arg>
      <arg choice='plain'><option>--remove</option> <replaceable>url</replaceable></arg>
      <arg choice='plain'><option>--list</option></arg>
      <arg choice='plain'><option>--update</option></arg>
    </group>
  </cmdsynopsis>
</refsynopsisdiv>

<refsection><title>Description</title>

<para>A Nix channel is 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 that contains a set of Nix
expressions, as well as a <command>nix-push</command> manifest.  See
also <xref linkend="sec-channels" />.</para>

<para>This command has the following operations:

<variablelist>

  <varlistentry><term><option>--add</option> <replaceable>url</replaceable></term>

    <listitem><para>Adds <replaceable>url</replaceable> to the list of
    subscribed channels.</para></listitem>

  </varlistentry>

  <varlistentry><term><option>--remove</option> <replaceable>url</replaceable></term>

    <listitem><para>Removes <replaceable>url</replaceable> from the
    list of subscribed channels.</para></listitem>

  </varlistentry>

  <varlistentry><term><option>--list</option></term>

    <listitem><para>Prints the URLs of all subscribed channels on
    standard output.</para></listitem>

  </varlistentry>

  <varlistentry><term><option>--update</option></term>

    <listitem><para>Downloads the Nix expressions of all subscribed
    channels, makes them the default for <command>nix-env</command>
    operations (by symlinking them in the directory
    <filename>~/.nix-defexpr</filename>), and performs a
    <command>nix-pull</command> on the manifests of all channels to
    make pre-built binaries available.</para></listitem>

  </varlistentry>

</variablelist>

</para>

<para>Note that <option>--add</option> and <option>--remove</option>
do not automatically perform an update.</para>

<para>The list of subscribed channels is stored in
<filename>~/.nix-channels</filename>.</para>

<para>A channel consists of two elements: a bzipped Tar archive
containing the Nix expressions, and a manifest created by
<command>nix-push</command>.  These must be stored under
<literal><replaceable>url</replaceable>/nixexprs.tar.bz2</literal> and
<literal><replaceable>url</replaceable>/MANIFEST</literal>,
respectively.</para>

</refsection>

</refentry>