* Manual.
This commit is contained in:
parent
30c7db85d8
commit
070e07ed5a
|
@ -148,6 +148,20 @@ $ rm -rf /nix/var</screen>
|
|||
</section>
|
||||
|
||||
|
||||
<section><info><title>Upgrading Nix through Nix</title></info>
|
||||
|
||||
<para>You can install the latest stable version of Nix through Nix
|
||||
itself by subscribing to the channel <link
|
||||
xlink:href="http://nix.cs.uu.nl/dist/nix/channels-v3/nix-stable" /> ,
|
||||
or the latest unstable version by subscribing to the channel<link
|
||||
xlink:href="http://nix.cs.uu.nl/dist/nix/channels-v3/nix-unstable" />.
|
||||
You can also do a <link linkend="sec-one-click">one-click
|
||||
installation</link> by clicking on the package links at <link
|
||||
xlink:href="http://nix.cs.uu.nl/dist/nix/" />.</para>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
<section><info><title>Permissions</title></info>
|
||||
|
||||
<para>All Nix operations must be performed under the user ID that owns
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
<refsynopsisdiv>
|
||||
<cmdsynopsis>
|
||||
<command>nix-collect-garbage</command>
|
||||
<arg><option>--delete-old</option></arg>
|
||||
<arg><option>-d</option></arg>
|
||||
<group choice='opt'>
|
||||
<arg choice='plain'><option>--print-roots</option></arg>
|
||||
<arg choice='plain'><option>--print-live</option></arg>
|
||||
|
@ -20,10 +22,28 @@
|
|||
|
||||
<refsection><title>Description</title>
|
||||
|
||||
<para>The command <command>nix-collect-garbage</command> is an
|
||||
obsolete wrapper around <link
|
||||
linkend="rsec-nix-store-gc"><command>nix-store
|
||||
--gc</command></link>.</para>
|
||||
<para>The command <command>nix-collect-garbage</command> is mostly an
|
||||
alias of <link linkend="rsec-nix-store-gc"><command>nix-store
|
||||
--gc</command></link>, that is, it deletes all unreachable paths in
|
||||
the Nix store to clean up your system. However, it provides an
|
||||
additional option <option>-d</option> (<option>--delete-old</option>)
|
||||
that deletes all old generations of all profiles in
|
||||
<filename>/nix/var/nix/profiles</filename> by invoking
|
||||
<literal>nix-env --delete-generations old</literal> on all profiles.
|
||||
Of course, this makes rollbacks to previous configurations
|
||||
impossible.</para>
|
||||
|
||||
</refsection>
|
||||
|
||||
<refsection><title>Example</title>
|
||||
|
||||
<para>To delete from the Nix store everything that is not used by the
|
||||
current generations of each profile, do
|
||||
|
||||
<screen>
|
||||
$ nix-collect-garbage -d</screen>
|
||||
|
||||
</para>
|
||||
|
||||
</refsection>
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ xlink:href='http://nix.cs.uu.nl/dist/nix' />.</para>
|
|||
Packages, you can view the set of available components in the release:
|
||||
|
||||
<screen>
|
||||
$ nix-env -qaf nixpkgs-<replaceable>version</replaceable>
|
||||
$ nix-env -qaf nixpkgs-<replaceable>version</replaceable> '*'
|
||||
ant-blackdown-1.4.2
|
||||
aterm-2.2
|
||||
bash-3.0
|
||||
|
@ -62,7 +62,7 @@ available components, i.e., whether they are installed into the user
|
|||
environment and/or present in the system:
|
||||
|
||||
<screen>
|
||||
$ nix-env -qasf nixpkgs-<replaceable>version</replaceable>
|
||||
$ nix-env -qasf nixpkgs-<replaceable>version</replaceable> '*'
|
||||
...
|
||||
-PS bash-3.0
|
||||
--S binutils-2.15
|
||||
|
@ -382,6 +382,19 @@ $ nix-store --gc --print-dead</screen>
|
|||
Likewise, the option <option>--print-live</option> will show the paths
|
||||
that <emphasis>won’t</emphasis> be deleted.</para>
|
||||
|
||||
<para>There is also a convenient little utility
|
||||
<command>nix-collect-garbage</command>, which when invoked with the
|
||||
<option>-d</option> (<option>--delete-old</option>) switch deletes all
|
||||
old generations of all profiles in
|
||||
<filename>/nix/var/nix/profiles</filename>. So
|
||||
|
||||
<screen>
|
||||
$ nix-collect-garbage -d</screen>
|
||||
|
||||
is a quick and easy way to clean up your system.</para>
|
||||
|
||||
|
||||
|
||||
|
||||
<section xml:id="ssec-gc-roots"><title>Garbage collector roots</title>
|
||||
|
||||
|
@ -463,4 +476,11 @@ available in the subscribed channels.</para>
|
|||
</section>
|
||||
|
||||
|
||||
<section xml:id="sec-one-click"><title>One-click installations</title>
|
||||
|
||||
<para>TODO</para>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
</chapter>
|
||||
|
|
|
@ -96,6 +96,16 @@ The latter command will upgrade each installed component for which
|
|||
there is a “newer” version (as determined by comparing the version
|
||||
numbers).</para></listitem>
|
||||
|
||||
<listitem><para>You can also install specific packages directly from
|
||||
your web browser. For instance, you can go to <link
|
||||
xlink:href="http://nix.cs.uu.nl/dist/nix/nixpkgs-unstable-latest/" />
|
||||
and click on any link for the individual packages for your platform.
|
||||
Associate <literal>application/nix-package</literal> with the program
|
||||
<filename>/nix/bin/nix-install-package</filename>. A window should
|
||||
appear asking you whether it’s okay to install the package. Say
|
||||
<literal>Y</literal>. The package and all its dependencies will be
|
||||
installed.</para></listitem>
|
||||
|
||||
<listitem><para>If you're unhappy with the result of a
|
||||
<command>nix-env</command> action (e.g., an upgraded component turned
|
||||
out not to work properly), you can go back:
|
||||
|
|
Loading…
Reference in a new issue