Document nixos-install
This commit is contained in:
parent
00f380dee5
commit
9b8847eb91
78
nixos/doc/manual/man-nixos-install.xml
Normal file
78
nixos/doc/manual/man-nixos-install.xml
Normal file
@ -0,0 +1,78 @@
|
||||
<refentry xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||
|
||||
<refmeta>
|
||||
<refentrytitle><command>nixos-install</command></refentrytitle>
|
||||
<manvolnum>8</manvolnum>
|
||||
<refmiscinfo class="source">NixOS</refmiscinfo>
|
||||
<!-- <refmiscinfo class="version"><xi:include href="version.txt" parse="text"/></refmiscinfo> -->
|
||||
</refmeta>
|
||||
|
||||
<refnamediv>
|
||||
<refname><command>nixos-install</command></refname>
|
||||
<refpurpose>install NixOS</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsynopsisdiv>
|
||||
<cmdsynopsis>
|
||||
<command>nixos-install</command>
|
||||
</cmdsynopsis>
|
||||
</refsynopsisdiv>
|
||||
|
||||
|
||||
<refsection><title>Description</title>
|
||||
|
||||
<para>This command installs NixOS in the file system mounted on
|
||||
<filename>/mnt</filename>, based on the NixOS configuration specified
|
||||
in <filename>/mnt/etc/nixos/configuration.nix</filename>. It performs
|
||||
the following steps:
|
||||
|
||||
<itemizedlist>
|
||||
|
||||
<listitem><para>It copies Nix and its dependencies to
|
||||
<filename>/mnt/nix/store</filename>.</para></listitem>
|
||||
|
||||
<listitem><para>It runs Nix in <filename>/mnt</filename> to build
|
||||
the NixOS configuration specified in
|
||||
<filename>/mnt/etc/nixos/configuration.nix</filename>.</para></listitem>
|
||||
|
||||
<listitem><para>It installs the GRUB boot loader on the device
|
||||
specified in the option <option>boot.loader.grub.device</option>,
|
||||
and generates a GRUB configuration file that boots into the NixOS
|
||||
configuration just installed.</para></listitem>
|
||||
|
||||
</itemizedlist>
|
||||
|
||||
</para>
|
||||
|
||||
<para>This command is idempotent: if it is interrupted or fails due to
|
||||
a temporary problem (e.g. a network issue), you can safely re-run
|
||||
it.</para>
|
||||
|
||||
</refsection>
|
||||
|
||||
|
||||
<refsection><title>Examples</title>
|
||||
|
||||
<para>A typical NixOS installation is done by creating and mounting a
|
||||
file system on <filename>/mnt</filename>, generating a NixOS
|
||||
configuration in
|
||||
<filename>/mnt/etc/nixos/configuration.nix</filename>, and running
|
||||
<command>nixos-install</command>. For instance, if we want to install
|
||||
NixOS on an <literal>ext4</literal> file system created in
|
||||
<filename>/dev/sda1</filename>:
|
||||
|
||||
<screen>
|
||||
$ mkfs.ext4 /dev/sda1
|
||||
$ mount /dev/sda1 /mnt
|
||||
$ nixos-generate-config --root /mnt
|
||||
$ # edit /mnt/etc/nixos/configuration.nix
|
||||
$ nixos-install
|
||||
</screen>
|
||||
|
||||
</para>
|
||||
|
||||
</refsection>
|
||||
|
||||
</refentry>
|
@ -22,9 +22,10 @@
|
||||
</info>
|
||||
|
||||
<xi:include href="man-configuration.xml" />
|
||||
<xi:include href="man-nixos-rebuild.xml" />
|
||||
<xi:include href="man-nixos-generate-config.xml" />
|
||||
<xi:include href="man-nixos-option.xml" />
|
||||
<xi:include href="man-nixos-build-vms.xml" />
|
||||
<xi:include href="man-nixos-generate-config.xml" />
|
||||
<xi:include href="man-nixos-install.xml" />
|
||||
<xi:include href="man-nixos-option.xml" />
|
||||
<xi:include href="man-nixos-rebuild.xml" />
|
||||
|
||||
</reference>
|
||||
|
Loading…
Reference in New Issue
Block a user