summary refs log tree commit diff
path: root/nixos/doc/manual/configuration/x-windows.xml
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2019-09-19 19:17:30 +0200
committerEelco Dolstra <edolstra@gmail.com>2019-09-19 19:17:30 +0200
commitb0ccd6dd16909c8639c2d9bee7dd2a2a0ac74c30 (patch)
treeee6367837650bb97dc5117d518217b11294900fe /nixos/doc/manual/configuration/x-windows.xml
parentdb3d31b903da12bc471e91d811d231dfe5b662ef (diff)
downloadnixpkgs-b0ccd6dd16909c8639c2d9bee7dd2a2a0ac74c30.tar
nixpkgs-b0ccd6dd16909c8639c2d9bee7dd2a2a0ac74c30.tar.gz
nixpkgs-b0ccd6dd16909c8639c2d9bee7dd2a2a0ac74c30.tar.bz2
nixpkgs-b0ccd6dd16909c8639c2d9bee7dd2a2a0ac74c30.tar.lz
nixpkgs-b0ccd6dd16909c8639c2d9bee7dd2a2a0ac74c30.tar.xz
nixpkgs-b0ccd6dd16909c8639c2d9bee7dd2a2a0ac74c30.tar.zst
nixpkgs-b0ccd6dd16909c8639c2d9bee7dd2a2a0ac74c30.zip
Revert "nixos/doc: re-format"
This reverts commit ea6e8775bd69e4676c623a85c39f1da540d29ad1. The new
format is not an improvement.
Diffstat (limited to 'nixos/doc/manual/configuration/x-windows.xml')
-rw-r--r--nixos/doc/manual/configuration/x-windows.xml151
1 files changed, 111 insertions, 40 deletions
diff --git a/nixos/doc/manual/configuration/x-windows.xml b/nixos/doc/manual/configuration/x-windows.xml
index 2d65ba479aa..f6f659b02af 100644
--- a/nixos/doc/manual/configuration/x-windows.xml
+++ b/nixos/doc/manual/configuration/x-windows.xml
@@ -5,18 +5,23 @@
          xml:id="sec-x11">
  <title>X Window System</title>
  <para>
-  The X Window System (X11) provides the basis of NixOS’ graphical user interface. It can be enabled as follows:
+  The X Window System (X11) provides the basis of NixOS’ graphical user
+  interface. It can be enabled as follows:
 <programlisting>
 <xref linkend="opt-services.xserver.enable"/> = true;
 </programlisting>
-  The X server will automatically detect and use the appropriate video driver from a set of X.org drivers (such as <literal>vesa</literal> and <literal>intel</literal>). You can also specify a driver manually, e.g.
+  The X server will automatically detect and use the appropriate video driver
+  from a set of X.org drivers (such as <literal>vesa</literal> and
+  <literal>intel</literal>). You can also specify a driver manually, e.g.
 <programlisting>
 <xref linkend="opt-services.xserver.videoDrivers"/> = [ "r128" ];
 </programlisting>
   to enable X.org’s <literal>xf86-video-r128</literal> driver.
  </para>
  <para>
-  You also need to enable at least one desktop or window manager. Otherwise, you can only log into a plain undecorated <command>xterm</command> window. Thus you should pick one or more of the following lines:
+  You also need to enable at least one desktop or window manager. Otherwise,
+  you can only log into a plain undecorated <command>xterm</command> window.
+  Thus you should pick one or more of the following lines:
 <programlisting>
 <xref linkend="opt-services.xserver.desktopManager.plasma5.enable"/> = true;
 <xref linkend="opt-services.xserver.desktopManager.xfce.enable"/> = true;
@@ -29,7 +34,9 @@
 </programlisting>
  </para>
  <para>
-  NixOS’s default <emphasis>display manager</emphasis> (the program that provides a graphical login prompt and manages the X server) is LightDM. You can select an alternative one by picking one of the following lines:
+  NixOS’s default <emphasis>display manager</emphasis> (the program that
+  provides a graphical login prompt and manages the X server) is LightDM. You
+  can select an alternative one by picking one of the following lines:
 <programlisting>
 <xref linkend="opt-services.xserver.displayManager.sddm.enable"/> = true;
 <xref linkend="opt-services.xserver.displayManager.slim.enable"/> = true;
@@ -43,7 +50,8 @@
 </programlisting>
  </para>
  <para>
-  The X server is started automatically at boot time. If you don’t want this to happen, you can set:
+  The X server is started automatically at boot time. If you don’t want this
+  to happen, you can set:
 <programlisting>
 <xref linkend="opt-services.xserver.autorun"/> = false;
 </programlisting>
@@ -53,7 +61,8 @@
 </screen>
  </para>
  <para>
-  On 64-bit systems, if you want OpenGL for 32-bit programs such as in Wine, you should also set the following:
+  On 64-bit systems, if you want OpenGL for 32-bit programs such as in Wine,
+  you should also set the following:
 <programlisting>
 <xref linkend="opt-hardware.opengl.driSupport32Bit"/> = true;
 </programlisting>
@@ -61,18 +70,23 @@
  <simplesect xml:id="sec-x11-auto-login">
   <title>Auto-login</title>
   <para>
-   The x11 login screen can be skipped entirely, automatically logging you into your window manager and desktop environment when you boot your computer.
+  The x11 login screen can be skipped entirely, automatically logging you into
+  your window manager and desktop environment when you boot your computer.
   </para>
   <para>
-   This is especially helpful if you have disk encryption enabled. Since you already have to provide a password to decrypt your disk, entering a second password to login can be redundant.
+  This is especially helpful if you have disk encryption enabled. Since you
+  already have to provide a password to decrypt your disk, entering a second
+  password to login can be redundant.
   </para>
   <para>
-   To enable auto-login, you need to define your default window manager and desktop environment. If you wanted no desktop environment and i3 as your your window manager, you'd define:
+  To enable auto-login, you need to define your default window manager and
+  desktop environment. If you wanted no desktop environment and i3 as your your
+  window manager, you'd define:
 <programlisting>
 <xref linkend="opt-services.xserver.desktopManager.default"/> = "none";
 <xref linkend="opt-services.xserver.windowManager.default"/> = "i3";
 </programlisting>
-   And, finally, to enable auto-login for a user <literal>johndoe</literal>:
+  And, finally, to enable auto-login for a user <literal>johndoe</literal>:
 <programlisting>
 <xref linkend="opt-services.xserver.displayManager.auto.enable"/> = true;
 <xref linkend="opt-services.xserver.displayManager.auto.user"/> = "johndoe";
@@ -82,7 +96,9 @@
  <simplesect xml:id="sec-x11-graphics-cards-nvidia">
   <title>Proprietary NVIDIA drivers</title>
   <para>
-   NVIDIA provides a proprietary driver for its graphics cards that has better 3D performance than the X.org drivers. It is not enabled by default because it’s not free software. You can enable it as follows:
+   NVIDIA provides a proprietary driver for its graphics cards that has better
+   3D performance than the X.org drivers. It is not enabled by default because
+   it’s not free software. You can enable it as follows:
 <programlisting>
 <xref linkend="opt-services.xserver.videoDrivers"/> = [ "nvidia" ];
 </programlisting>
@@ -93,51 +109,76 @@
 <xref linkend="opt-services.xserver.videoDrivers"/> = [ "nvidiaLegacy304" ];
 <xref linkend="opt-services.xserver.videoDrivers"/> = [ "nvidiaLegacy173" ];
 </programlisting>
-   You may need to reboot after enabling this driver to prevent a clash with other kernel modules.
+   You may need to reboot after enabling this driver to prevent a clash with
+   other kernel modules.
   </para>
  </simplesect>
  <simplesect xml:id="sec-x11--graphics-cards-amd">
   <title>Proprietary AMD drivers</title>
   <para>
-   AMD provides a proprietary driver for its graphics cards that has better 3D performance than the X.org drivers. It is not enabled by default because it’s not free software. You can enable it as follows:
+   AMD provides a proprietary driver for its graphics cards that has better 3D
+   performance than the X.org drivers. It is not enabled by default because
+   it’s not free software. You can enable it as follows:
 <programlisting>
 <xref linkend="opt-services.xserver.videoDrivers"/> = [ "ati_unfree" ];
 </programlisting>
-   You will need to reboot after enabling this driver to prevent a clash with other kernel modules.
+   You will need to reboot after enabling this driver to prevent a clash with
+   other kernel modules.
   </para>
   <note>
-   <para>
-    For recent AMD GPUs you most likely want to keep either the defaults or <literal>"amdgpu"</literal> (both free).
-   </para>
+  <para>
+   For recent AMD GPUs you most likely want to keep either the defaults
+   or <literal>"amdgpu"</literal> (both free).
+  </para>
   </note>
  </simplesect>
  <simplesect xml:id="sec-x11-touchpads">
   <title>Touchpads</title>
   <para>
-   Support for Synaptics touchpads (found in many laptops such as the Dell Latitude series) can be enabled as follows:
+   Support for Synaptics touchpads (found in many laptops such as the Dell
+   Latitude series) can be enabled as follows:
 <programlisting>
 <xref linkend="opt-services.xserver.libinput.enable"/> = true;
 </programlisting>
-   The driver has many options (see <xref linkend="ch-options"/>). For instance, the following disables tap-to-click behavior:
+   The driver has many options (see <xref linkend="ch-options"/>). For
+   instance, the following disables tap-to-click behavior:
 <programlisting>
 <xref linkend="opt-services.xserver.libinput.tapping"/> = false;
 </programlisting>
-   Note: the use of <literal>services.xserver.synaptics</literal> is deprecated since NixOS 17.09.
+   Note: the use of <literal>services.xserver.synaptics</literal> is deprecated
+   since NixOS 17.09.
   </para>
  </simplesect>
  <simplesect xml:id="sec-x11-gtk-and-qt-themes">
   <title>GTK/Qt themes</title>
   <para>
-   GTK themes can be installed either to user profile or system-wide (via <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.
+   GTK themes can be installed either to user profile or system-wide (via
+   <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>
  </simplesect>
  <simplesect xml:id="custom-xkb-layouts">
   <title>Custom XKB layouts</title>
   <para>
-   It is possible to install custom <link xlink:href="https://en.wikipedia.org/wiki/X_keyboard_extension"> XKB </link> keyboard layouts using the option <option> <link linkend="opt-services.xserver.extraLayouts"> services.xserver.extraLayouts </link> </option>. As a first example, we are going to create a layout based on the basic US layout, with an additional layer to type some greek symbols by pressing the right-alt key.
+   It is possible to install custom
+   <link xlink:href="https://en.wikipedia.org/wiki/X_keyboard_extension">
+    XKB
+   </link>
+   keyboard layouts using the option
+   <option>
+    <link linkend="opt-services.xserver.extraLayouts">
+     services.xserver.extraLayouts
+    </link>
+   </option>.
+   As a first example, we are going to create a layout based on the basic US
+   layout, with an additional layer to type some greek symbols by pressing the
+   right-alt key.
   </para>
   <para>
-   To do this we are going to create a <literal>us-greek</literal> file with a <literal>xkb_symbols</literal> section.
+   To do this we are going to create a <literal>us-greek</literal> file
+   with a <literal>xkb_symbols</literal> section.
   </para>
 <programlisting>
 xkb_symbols &quot;us-greek&quot;
@@ -153,7 +194,8 @@ xkb_symbols &quot;us-greek&quot;
 };
 </programlisting>
   <para>
-   To install the layout, the filepath, a description and the list of languages must be given:
+   To install the layout, the filepath, a description and the list of
+   languages must be given:
   </para>
 <programlisting>
 <xref linkend="opt-services.xserver.extraLayouts"/>.us-greek = {
@@ -163,18 +205,32 @@ xkb_symbols &quot;us-greek&quot;
 }
 </programlisting>
   <note>
-   <para>
-    The name should match the one given to the <literal>xkb_symbols</literal> block.
-   </para>
+  <para>
+   The name should match the one given to the
+   <literal>xkb_symbols</literal> block.
+  </para>
   </note>
   <para>
-   The layout should now be installed and ready to use: try it by running <literal>setxkbmap us-greek</literal> and type <literal>&lt;alt&gt;+a</literal>. To change the default the usual <option> <link linkend="opt-services.xserver.layout"> services.xserver.layout </link> </option> option can still be used.
+   The layout should now be installed and ready to use: try it by
+   running <literal>setxkbmap us-greek</literal> and type
+   <literal>&lt;alt&gt;+a</literal>. To change the default the usual
+   <option>
+    <link linkend="opt-services.xserver.layout">
+     services.xserver.layout
+    </link>
+   </option>
+   option can still be used.
   </para>
   <para>
-   A layout can have several other components besides <literal>xkb_symbols</literal>, for example we will define new keycodes for some multimedia key and bind these to some symbol.
+   A layout can have several other components besides
+   <literal>xkb_symbols</literal>, for example we will define new
+   keycodes for some multimedia key and bind these to some symbol.
   </para>
   <para>
-   Use the <emphasis>xev</emphasis> utility from <literal>pkgs.xorg.xev</literal> to find the codes of the keys of interest, then create a <literal>media-key</literal> file to hold the keycodes definitions
+   Use the <emphasis>xev</emphasis> utility from
+   <literal>pkgs.xorg.xev</literal> to find the codes of the keys of
+   interest, then create a <literal>media-key</literal> file to hold
+   the keycodes definitions
   </para>
 <programlisting>
 xkb_keycodes &quot;media&quot;
@@ -184,7 +240,7 @@ xkb_keycodes &quot;media&quot;
 }
 </programlisting>
   <para>
-   Now use the newly define keycodes in <literal>media-sym</literal>:
+    Now use the newly define keycodes in <literal>media-sym</literal>:
   </para>
 <programlisting>
 xkb_symbols &quot;media&quot;
@@ -195,7 +251,7 @@ xkb_symbols &quot;media&quot;
 }
 </programlisting>
   <para>
-   As before, to install the layout do
+    As before, to install the layout do
   </para>
 <programlisting>
 <xref linkend="opt-services.xserver.extraLayouts"/>.media = {
@@ -206,22 +262,37 @@ xkb_symbols &quot;media&quot;
 };
 </programlisting>
   <note>
-   <para>
-    The function <literal>pkgs.writeText &lt;filename&gt; &lt;content&gt; </literal> can be useful if you prefer to keep the layout definitions inside the NixOS configuration.
-   </para>
+  <para>
+   The function <literal>pkgs.writeText &lt;filename&gt; &lt;content&gt;
+   </literal> can be useful if you prefer to keep the layout definitions
+   inside the NixOS configuration.
+  </para>
   </note>
   <para>
-   Unfortunately, the Xorg server does not (currently) support setting a keymap directly but relies instead on XKB rules to select the matching components (keycodes, types, ...) of a layout. This means that components other than symbols won't be loaded by default. As a workaround, you can set the keymap using <literal>setxkbmap</literal> at the start of the session with:
+    Unfortunately, the Xorg server does not (currently) support setting a
+    keymap directly but relies instead on XKB rules to select the matching
+    components (keycodes, types, ...) of a layout. This means that components
+    other than symbols won't be loaded by default. As a workaround, you
+    can set the keymap using <literal>setxkbmap</literal> at the start of the
+    session with:
   </para>
 <programlisting>
 <xref linkend="opt-services.xserver.displayManager.sessionCommands"/> = "setxkbmap -keycodes media";
 </programlisting>
   <para>
-   If you are manually starting the X server, you should set the argument <literal>-xkbdir /etc/X11/xkb</literal>, otherwise X won't find your layout files. For example with <command>xinit</command> run
-<screen><prompt>$ </prompt>xinit -- -xkbdir /etc/X11/xkb</screen>
+    If you are manually starting the X server, you should set the argument
+    <literal>-xkbdir /etc/X11/xkb</literal>, otherwise X won't find your layout files.
+    For example with <command>xinit</command> run
+    <screen><prompt>$ </prompt>xinit -- -xkbdir /etc/X11/xkb</screen>
   </para>
   <para>
-   To learn how to write layouts take a look at the XKB <link xlink:href="https://www.x.org/releases/current/doc/xorg-docs/input/XKB-Enhancing.html#Defining_New_Layouts"> documentation </link>. More example layouts can also be found <link xlink:href="https://wiki.archlinux.org/index.php/X_KeyBoard_extension#Basic_examples"> here </link>.
+   To learn how to write layouts take a look at the XKB
+  <link xlink:href="https://www.x.org/releases/current/doc/xorg-docs/input/XKB-Enhancing.html#Defining_New_Layouts">
+   documentation
+  </link>. More example layouts can also be found
+  <link xlink:href="https://wiki.archlinux.org/index.php/X_KeyBoard_extension#Basic_examples">
+   here
+  </link>.
   </para>
- </simplesect>
+</simplesect>
 </chapter>