diff options
Diffstat (limited to 'nixos/doc')
-rw-r--r-- | nixos/doc/manual/configuration/firewall.xml | 19 | ||||
-rw-r--r-- | nixos/doc/manual/configuration/x-windows.xml | 2 | ||||
-rw-r--r-- | nixos/doc/manual/development/option-types.xml | 6 | ||||
-rw-r--r-- | nixos/doc/manual/installation/installing-uefi.xml | 48 | ||||
-rw-r--r-- | nixos/doc/manual/installation/installing.xml | 122 | ||||
-rw-r--r-- | nixos/doc/manual/release-notes/rl-1404.xml | 2 | ||||
-rw-r--r-- | nixos/doc/manual/release-notes/rl-1803.xml | 14 |
7 files changed, 152 insertions, 61 deletions
diff --git a/nixos/doc/manual/configuration/firewall.xml b/nixos/doc/manual/configuration/firewall.xml index 87406c28c2f7..75cccef95b38 100644 --- a/nixos/doc/manual/configuration/firewall.xml +++ b/nixos/doc/manual/configuration/firewall.xml @@ -23,10 +23,23 @@ networking.firewall.allowedTCPPorts = [ 80 443 ]; </programlisting> Note that TCP port 22 (ssh) is opened automatically if the SSH daemon -is enabled (<option>services.openssh.enable = true</option>). UDP +is enabled (<option>services.openssh.enable = true</option>). UDP ports can be opened through -<option>networking.firewall.allowedUDPPorts</option>. Also of -interest is +<option>networking.firewall.allowedUDPPorts</option>.</para> + +<para>To open ranges of TCP ports: + +<programlisting> +networking.firewall.allowedTCPPortRanges = [ + { from = 4000; to = 4007; } + { from = 8000; to = 8010; } +]; +</programlisting> + +Similarly, UDP port ranges can be opened through +<option>networking.firewall.allowedUDPPortRanges</option>.</para> + +<para>Also of interest is <programlisting> networking.firewall.allowPing = true; diff --git a/nixos/doc/manual/configuration/x-windows.xml b/nixos/doc/manual/configuration/x-windows.xml index bc352609944b..9c2c59006f15 100644 --- a/nixos/doc/manual/configuration/x-windows.xml +++ b/nixos/doc/manual/configuration/x-windows.xml @@ -130,7 +130,7 @@ Note: the use of <literal>services.xserver.synaptics</literal> is deprecated sin <simplesect><title>GTK/Qt themes</title> <para>GTK themes can be installed either to user profile or system-wide (via -<literal>system.environmentPackages</literal>). To make Qt 5 applications look similar +<literal>environment.systemPackages</literal>). To make Qt 5 applications look similar to GTK2 ones, you can install <literal>qt5.qtbase.gtk</literal> package into your system environment. It should work for all Qt 5 library versions. </para> diff --git a/nixos/doc/manual/development/option-types.xml b/nixos/doc/manual/development/option-types.xml index 83dcf0232d9d..ec940d5d2b86 100644 --- a/nixos/doc/manual/development/option-types.xml +++ b/nixos/doc/manual/development/option-types.xml @@ -110,6 +110,12 @@ <listitem><para>A string. Multiple definitions are concatenated with a collon <literal>":"</literal>.</para></listitem> </varlistentry> + <varlistentry> + <term><varname>types.strMatching</varname></term> + <listitem><para>A string matching a specific regular expression. Multiple + definitions cannot be merged. The regular expression is processed using + <literal>builtins.match</literal>.</para></listitem> + </varlistentry> </variablelist> </section> diff --git a/nixos/doc/manual/installation/installing-uefi.xml b/nixos/doc/manual/installation/installing-uefi.xml deleted file mode 100644 index 0d3eaa8bb1fb..000000000000 --- a/nixos/doc/manual/installation/installing-uefi.xml +++ /dev/null @@ -1,48 +0,0 @@ -<section xmlns="http://docbook.org/ns/docbook" - xmlns:xlink="http://www.w3.org/1999/xlink" - xmlns:xi="http://www.w3.org/2001/XInclude" - version="5.0" - xml:id="sec-uefi-installation"> - -<title>UEFI Installation</title> - -<para>NixOS can also be installed on UEFI systems. The procedure -is by and large the same as a BIOS installation, with the following -changes: - -<itemizedlist> - <listitem> - <para>You should boot the live CD in UEFI mode (consult your - specific hardware's documentation for instructions). You may find - the <link - xlink:href="http://www.rodsbooks.com/refind">rEFInd - boot manager</link> useful.</para> - </listitem> - <listitem> - <para>Instead of <command>fdisk</command>, you should use - <command>gdisk</command> to partition your disks. You will need to - have a separate partition for <filename>/boot</filename> with - partition code EF00, and it should be formatted as a - <literal>vfat</literal> filesystem.</para> - </listitem> - <listitem> - <para>Instead of <option>boot.loader.grub.device</option>, - you must set <option>boot.loader.systemd-boot.enable</option> to - <literal>true</literal>. <command>nixos-generate-config</command> - should do this automatically for new configurations when booted in - UEFI mode.</para> - </listitem> - <listitem> - <para>After having mounted your installation partition to - <code>/mnt</code>, you must mount the <code>boot</code> partition - to <code>/mnt/boot</code>.</para> - </listitem> - <listitem> - <para>You may want to look at the options starting with - <option>boot.loader.efi</option> and <option>boot.loader.systemd-boot</option> - as well.</para> - </listitem> -</itemizedlist> -</para> - -</section> diff --git a/nixos/doc/manual/installation/installing.xml b/nixos/doc/manual/installation/installing.xml index b0674307a563..ab9108c30a71 100644 --- a/nixos/doc/manual/installation/installing.xml +++ b/nixos/doc/manual/installation/installing.xml @@ -6,9 +6,18 @@ <title>Installing NixOS</title> +<para>NixOS can be installed on BIOS or UEFI systems. The procedure +for a UEFI installation is by and large the same as a BIOS installation. The differences are mentioned in the steps that follow.</para> + <orderedlist> - <listitem><para>Boot from the CD.</para></listitem> + <listitem><para>Boot from the CD.</para> + <variablelist> + <varlistentry><term>UEFI systems</term> + <listitem><para>You should boot the live CD in UEFI mode + (consult your specific hardware's documentation for instructions). + You may find the <link xlink:href="http://www.rodsbooks.com/refind">rEFInd boot + manager</link> useful.</para></listitem></varlistentry></variablelist></listitem> <listitem><para>The CD contains a basic NixOS installation. (It also contains Memtest86+, useful if you want to test new hardware). @@ -50,7 +59,31 @@ <itemizedlist> <listitem><para>For partitioning: - <command>fdisk</command>.</para></listitem> + <command>fdisk</command>. +<screen> +# fdisk /dev/sda # <lineannotation>(or whatever device you want to install on)</lineannotation> +-- for UEFI systems only +> n # <lineannotation>(create a new partition for /boot)</lineannotation> +> 3 # <lineannotation>(make it a partition number 3)</lineannotation> +> # <lineannotation>(press enter to accept the default)</lineannotation> +> +512M # <lineannotation>(the size of the UEFI boot partition)</lineannotation> +> t # <lineannotation>(change the partition type ...)</lineannotation> +> 3 # <lineannotation>(... of the boot partition ...)</lineannotation> +> 1 # <lineannotation>(... to 'UEFI System')</lineannotation> +-- for BIOS or UEFI systems +> n # <lineannotation>(create a new partition for /swap)</lineannotation> +> 2 # <lineannotation>(make it a partition number 2)</lineannotation> +> # <lineannotation>(press enter to accept the default)</lineannotation> +> +8G # <lineannotation>(the size of the swap partition, set to whatever you like)</lineannotation> +> n # <lineannotation>(create a new partition for /)</lineannotation> +> 1 # <lineannotation>(make it a partition number 1)</lineannotation> +> # <lineannotation>(press enter to accept the default)</lineannotation> +> # <lineannotation>(press enter to accept the default and use the rest of the remaining space)</lineannotation> +> a # <lineannotation>(make the partition bootable)</lineannotation> +> x # <lineannotation>(enter expert mode)</lineannotation> +> f # <lineannotation>(fix up the partition ordering)</lineannotation> +> r # <lineannotation>(exit expert mode)</lineannotation> +> w # <lineannotation>(write the partition table to disk and exit)</lineannotation></screen></para></listitem> <listitem><para>For initialising Ext4 partitions: <command>mkfs.ext4</command>. It is recommended that you assign a @@ -67,7 +100,25 @@ <listitem><para>For creating swap partitions: <command>mkswap</command>. Again it’s recommended to assign a label to the swap partition: <option>-L - <replaceable>label</replaceable></option>.</para></listitem> + <replaceable>label</replaceable></option>. For example: + +<screen> +# mkswap -L swap /dev/sda2</screen> + + </para></listitem> + + <listitem> + <variablelist> + <varlistentry><term>UEFI systems</term> + <listitem><para>For creating boot partitions: + <command>mkfs.fat</command>. Again it’s recommended to assign a + label to the boot partition: <option>-L + <replaceable>label</replaceable></option>. For example: + +<screen> +# mkfs.fat -F 32 -L boot /dev/sda3</screen> + + </para></listitem></varlistentry></variablelist></listitem> <listitem><para>For creating LVM volumes, the LVM commands, e.g., @@ -95,11 +146,27 @@ </para></listitem> + <listitem> + <variablelist> + <varlistentry><term>UEFI systems</term> + <listitem><para>Mount the boot file system on <filename>/mnt/boot</filename>, e.g. + +<screen> +# mount /dev/disk/by-label/boot /mnt/boot +</screen> + + </para></listitem></varlistentry></variablelist></listitem> + <listitem><para>If your machine has a limited amount of memory, you may want to activate swap devices now (<command>swapon <replaceable>device</replaceable></command>). The installer (or rather, the build actions that it may spawn) may need quite a bit of - RAM, depending on your configuration.</para></listitem> + RAM, depending on your configuration. + +<screen> +# swapon /dev/sda2</screen> + + </para></listitem> <listitem> @@ -135,10 +202,25 @@ install Emacs by running <literal>nix-env -i emacs</literal>.</para> - <para>You <emphasis>must</emphasis> set the option + <variablelist> + + <varlistentry><term>BIOS systems</term> + <listitem><para>You <emphasis>must</emphasis> set the option <option>boot.loader.grub.device</option> to specify on which disk the GRUB boot loader is to be installed. Without it, NixOS cannot - boot.</para> + boot.</para></listitem></varlistentry> + + <varlistentry><term>UEFI systems</term> + <listitem><para>You <emphasis>must</emphasis> set the option + <option>boot.loader.systemd-boot.enable</option> to <literal>true</literal>. + <command>nixos-generate-config</command> should do this automatically for new + configurations when booted in + UEFI mode.</para> + <para>You may want to look at the options starting with + <option>boot.loader.efi</option> and <option>boot.loader.systemd-boot</option> + as well.</para></listitem></varlistentry> + + </variablelist> <para>If there are other operating systems running on the machine before installing NixOS, the @@ -247,10 +329,34 @@ drive (here <filename>/dev/sda</filename>). <xref linkend="ex-config" <example xml:id='ex-install-sequence'><title>Commands for Installing NixOS on <filename>/dev/sda</filename></title> <screen> # fdisk /dev/sda # <lineannotation>(or whatever device you want to install on)</lineannotation> +-- for UEFI systems only +> n # <lineannotation>(create a new partition for /boot)</lineannotation> +> 3 # <lineannotation>(make it a partition number 3)</lineannotation> +> # <lineannotation>(press enter to accept the default)</lineannotation> +> +512M # <lineannotation>(the size of the UEFI boot partition)</lineannotation> +> t # <lineannotation>(change the partition type ...)</lineannotation> +> 3 # <lineannotation>(... of the boot partition ...)</lineannotation> +> 1 # <lineannotation>(... to 'UEFI System')</lineannotation> +-- for BIOS or UEFI systems +> n # <lineannotation>(create a new partition for /swap)</lineannotation> +> 2 # <lineannotation>(make it a partition number 2)</lineannotation> +> # <lineannotation>(press enter to accept the default)</lineannotation> +> +8G # <lineannotation>(the size of the swap partition)</lineannotation> +> n # <lineannotation>(create a new partition for /)</lineannotation> +> 1 # <lineannotation>(make it a partition number 1)</lineannotation> +> # <lineannotation>(press enter to accept the default)</lineannotation> +> # <lineannotation>(press enter to accept the default and use the rest of the remaining space)</lineannotation> +> a # <lineannotation>(make the partition bootable)</lineannotation> +> x # <lineannotation>(enter expert mode)</lineannotation> +> f # <lineannotation>(fix up the partition ordering)</lineannotation> +> r # <lineannotation>(exit expert mode)</lineannotation> +> w # <lineannotation>(write the partition table to disk and exit)</lineannotation> # mkfs.ext4 -L nixos /dev/sda1 # mkswap -L swap /dev/sda2 # swapon /dev/sda2 +# mkfs.fat -F 32 -L boot /dev/sda3 # <lineannotation>(for UEFI systems only)</lineannotation> # mount /dev/disk/by-label/nixos /mnt +# mount /dev/disk/by-label/boot /mnt/boot # <lineannotation>(for UEFI systems only)</lineannotation> # nixos-generate-config --root /mnt # nano /mnt/etc/nixos/configuration.nix # nixos-install @@ -267,7 +373,8 @@ drive (here <filename>/dev/sda</filename>). <xref linkend="ex-config" ./hardware-configuration.nix ]; - boot.loader.grub.device = "/dev/sda"; + boot.loader.grub.device = "/dev/sda"; # <lineannotation>(for BIOS systems only)</lineannotation> + boot.loader.systemd-boot.enable = true; # <lineannotation>(for UEFI systems only)</lineannotation> # Note: setting fileSystems is generally not # necessary, since nixos-generate-config figures them out @@ -279,7 +386,6 @@ drive (here <filename>/dev/sda</filename>). <xref linkend="ex-config" }</screen> </example> -<xi:include href="installing-uefi.xml" /> <xi:include href="installing-usb.xml" /> <xi:include href="installing-pxe.xml" /> <xi:include href="installing-virtualbox-guest.xml" /> diff --git a/nixos/doc/manual/release-notes/rl-1404.xml b/nixos/doc/manual/release-notes/rl-1404.xml index 36f67ed88b0b..137caf14cba2 100644 --- a/nixos/doc/manual/release-notes/rl-1404.xml +++ b/nixos/doc/manual/release-notes/rl-1404.xml @@ -13,7 +13,7 @@ the following highlights: <itemizedlist> <listitem><para>Installation on UEFI systems is now supported. See - <xref linkend="sec-uefi-installation"/> for + <xref linkend="sec-installation"/> for details.</para></listitem> <listitem><para>Systemd has been updated to version 212, which has diff --git a/nixos/doc/manual/release-notes/rl-1803.xml b/nixos/doc/manual/release-notes/rl-1803.xml index b0e29182127e..6329ec705821 100644 --- a/nixos/doc/manual/release-notes/rl-1803.xml +++ b/nixos/doc/manual/release-notes/rl-1803.xml @@ -131,6 +131,20 @@ following incompatible changes:</para> must be set to true. </para> </listitem> + <listitem> + <para> + The option <option>services.logstash.listenAddress</option> is now <literal>127.0.0.1</literal> by default. + Previously the default behaviour was to listen on all interfaces. + </para> + </listitem> + <listitem> + <para> + <literal>services.btrfs.autoScrub</literal> has been added, to + periodically check btrfs filesystems for data corruption. + If there's a correct copy available, it will automatically repair + corrupted blocks. + </para> + </listitem> </itemizedlist> </section> |