about summary refs log tree commit diff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/builders/packages/emacs.section.md2
-rw-r--r--doc/builders/packages/firefox.section.md49
-rw-r--r--doc/builders/packages/index.xml7
-rw-r--r--doc/builders/packages/linux.section.md41
-rw-r--r--doc/builders/packages/linux.xml85
-rw-r--r--doc/builders/packages/nginx.section.md11
-rw-r--r--doc/builders/packages/nginx.xml25
-rw-r--r--doc/builders/packages/urxvt.section.md71
-rw-r--r--doc/builders/packages/urxvt.xml115
-rw-r--r--doc/languages-frameworks/index.xml2
-rw-r--r--doc/languages-frameworks/texlive.section.md128
-rw-r--r--doc/languages-frameworks/texlive.xml152
12 files changed, 306 insertions, 382 deletions
diff --git a/doc/builders/packages/emacs.section.md b/doc/builders/packages/emacs.section.md
index 3829b3575bb1..e9b89d086d68 100644
--- a/doc/builders/packages/emacs.section.md
+++ b/doc/builders/packages/emacs.section.md
@@ -1,6 +1,6 @@
 # Emacs {#sec-emacs}
 
-## Configuring Emacs
+## Configuring Emacs {#sec-emacs-config}
 
 The Emacs package comes with some extra helpers to make it easier to configure. `emacsWithPackages` allows you to manage packages from ELPA. This means that you will not have to install that packages from within Emacs. For instance, if you wanted to use `company` `counsel`, `flycheck`, `ivy`, `magit`, `projectile`, and `use-package` you could use this as a `~/.config/nixpkgs/config.nix` override:
 
diff --git a/doc/builders/packages/firefox.section.md b/doc/builders/packages/firefox.section.md
new file mode 100644
index 000000000000..734b1839a3e6
--- /dev/null
+++ b/doc/builders/packages/firefox.section.md
@@ -0,0 +1,49 @@
+# Firefox
+
+## Build wrapped Firefox with extensions and policies
+
+The `wrapFirefox` function allows to pass policies, preferences and extension that are available to firefox. With the help of `fetchFirefoxAddon` this allows build a firefox version that already comes with addons pre-installed:
+
+```nix
+{
+  myFirefox = wrapFirefox firefox-unwrapped {
+    nixExtensions = [
+      (fetchFirefoxAddon {
+        name = "ublock";
+        url = "https://addons.mozilla.org/firefox/downloads/file/3679754/ublock_origin-1.31.0-an+fx.xpi";
+        sha256 = "1h768ljlh3pi23l27qp961v1hd0nbj2vasgy11bmcrlqp40zgvnr";
+      })
+    ];
+
+    extraPolicies = {
+      CaptivePortal = false;
+      DisableFirefoxStudies = true;
+      DisablePocket = true;
+      DisableTelemetry = true;
+      DisableFirefoxAccounts = true;
+      FirefoxHome = {
+        Pocket = false;
+        Snippets = false;
+      };
+       UserMessaging = {
+         ExtensionRecommendations = false;
+         SkipOnboarding = true;
+       };
+    };
+
+    extraPrefs = ''
+      // Show more ssl cert infos
+      lockPref("security.identityblock.show_extended_validation", true);
+    '';
+  };
+}
+```
+
+If `nixExtensions != null` then all manually installed addons will be uninstalled from your browser profile.
+To view available enterprise policies visit [enterprise policies](https://github.com/mozilla/policy-templates#enterprisepoliciesenabled)
+or type into the Firefox url bar: `about:policies#documentation`.
+Nix installed addons do not have a valid signature, which is why signature verification is disabled. This does not compromise security because downloaded addons are checksumed and manual addons can't be installed.
+
+# Troubleshooting
+If addons do not appear installed although they have been defined in your nix configuration file reset the local addon state of your Firefox profile by clicking `help -> restart with addons disabled -> restart -> refresh firefox`. This can happen if you switch from manual addon mode to nix addon mode and then back to manual mode and then again to nix addon mode.
+
diff --git a/doc/builders/packages/index.xml b/doc/builders/packages/index.xml
index 58417a0fc777..c7a4aa9f47dc 100644
--- a/doc/builders/packages/index.xml
+++ b/doc/builders/packages/index.xml
@@ -10,16 +10,17 @@
  <xi:include href="eclipse.xml" />
  <xi:include href="elm.xml" />
  <xi:include href="emacs.section.xml" />
+ <xi:include href="firefox.section.xml" />
  <xi:include href="ibus.xml" />
  <xi:include href="kakoune.section.xml" />
- <xi:include href="linux.xml" />
+ <xi:include href="linux.section.xml" />
  <xi:include href="locales.xml" />
- <xi:include href="nginx.xml" />
+ <xi:include href="nginx.section.xml" />
  <xi:include href="opengl.section.xml" />
  <xi:include href="shell-helpers.section.xml" />
  <xi:include href="steam.xml" />
  <xi:include href="cataclysm-dda.section.xml" />
- <xi:include href="urxvt.xml" />
+ <xi:include href="urxvt.section.xml" />
  <xi:include href="weechat.section.xml" />
  <xi:include href="xorg.section.xml" />
 </chapter>
diff --git a/doc/builders/packages/linux.section.md b/doc/builders/packages/linux.section.md
new file mode 100644
index 000000000000..1b8d6eda749d
--- /dev/null
+++ b/doc/builders/packages/linux.section.md
@@ -0,0 +1,41 @@
+# Linux kernel {#sec-linux-kernel}
+
+The Nix expressions to build the Linux kernel are in [`pkgs/os-specific/linux/kernel`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/os-specific/linux/kernel).
+
+The function that builds the kernel has an argument `kernelPatches` which should be a list of `{name, patch, extraConfig}` attribute sets, where `name` is the name of the patch (which is included in the kernel’s `meta.description` attribute), `patch` is the patch itself (possibly compressed), and `extraConfig` (optional) is a string specifying extra options to be concatenated to the kernel configuration file (`.config`).
+
+The kernel derivation exports an attribute `features` specifying whether optional functionality is or isn’t enabled. This is used in NixOS to implement kernel-specific behaviour. For instance, if the kernel has the `iwlwifi` feature (i.e. has built-in support for Intel wireless chipsets), then NixOS doesn’t have to build the external `iwlwifi` package:
+
+```nix
+modulesTree = [kernel]
+  ++ pkgs.lib.optional (!kernel.features ? iwlwifi) kernelPackages.iwlwifi
+  ++ ...;
+```
+
+How to add a new (major) version of the Linux kernel to Nixpkgs:
+
+1.  Copy the old Nix expression (e.g. `linux-2.6.21.nix`) to the new one (e.g. `linux-2.6.22.nix`) and update it.
+
+2.  Add the new kernel to `all-packages.nix` (e.g., create an attribute `kernel_2_6_22`).
+
+3.  Now we’re going to update the kernel configuration. First unpack the kernel. Then for each supported platform (`i686`, `x86_64`, `uml`) do the following:
+
+    1.  Make an copy from the old config (e.g. `config-2.6.21-i686-smp`) to the new one (e.g. `config-2.6.22-i686-smp`).
+
+    2.  Copy the config file for this platform (e.g. `config-2.6.22-i686-smp`) to `.config` in the kernel source tree.
+
+    3.  Run `make oldconfig ARCH={i386,x86_64,um}` and answer all questions. (For the uml configuration, also add `SHELL=bash`.) Make sure to keep the configuration consistent between platforms (i.e. don’t enable some feature on `i686` and disable it on `x86_64`).
+
+    4.  If needed you can also run `make menuconfig`:
+
+        ```ShellSession
+        $ nix-env -i ncurses
+        $ export NIX_CFLAGS_LINK=-lncurses
+        $ make menuconfig ARCH=arch
+        ```
+
+    5.  Copy `.config` over the new config file (e.g. `config-2.6.22-i686-smp`).
+
+4.  Test building the kernel: `nix-build -A kernel_2_6_22`. If it compiles, ship it! For extra credit, try booting NixOS with it.
+
+5.  It may be that the new kernel requires updating the external kernel modules and kernel-dependent packages listed in the `linuxPackagesFor` function in `all-packages.nix` (such as the NVIDIA drivers, AUFS, etc.). If the updated packages aren’t backwards compatible with older kernels, you may need to keep the older versions around.
diff --git a/doc/builders/packages/linux.xml b/doc/builders/packages/linux.xml
deleted file mode 100644
index 72d0e21493b3..000000000000
--- a/doc/builders/packages/linux.xml
+++ /dev/null
@@ -1,85 +0,0 @@
-<section xmlns="http://docbook.org/ns/docbook"
-         xmlns:xlink="http://www.w3.org/1999/xlink"
-         xml:id="sec-linux-kernel">
- <title>Linux kernel</title>
-
- <para>
-  The Nix expressions to build the Linux kernel are in <link
-xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/os-specific/linux/kernel"><filename>pkgs/os-specific/linux/kernel</filename></link>.
- </para>
-
- <para>
-  The function that builds the kernel has an argument <varname>kernelPatches</varname> which should be a list of <literal>{name, patch, extraConfig}</literal> attribute sets, where <varname>name</varname> is the name of the patch (which is included in the kernel’s <varname>meta.description</varname> attribute), <varname>patch</varname> is the patch itself (possibly compressed), and <varname>extraConfig</varname> (optional) is a string specifying extra options to be concatenated to the kernel configuration file (<filename>.config</filename>).
- </para>
-
- <para>
-  The kernel derivation exports an attribute <varname>features</varname> specifying whether optional functionality is or isn’t enabled. This is used in NixOS to implement kernel-specific behaviour. For instance, if the kernel has the <varname>iwlwifi</varname> feature (i.e. has built-in support for Intel wireless chipsets), then NixOS doesn’t have to build the external <varname>iwlwifi</varname> package:
-<programlisting>
-modulesTree = [kernel]
-  ++ pkgs.lib.optional (!kernel.features ? iwlwifi) kernelPackages.iwlwifi
-  ++ ...;
-</programlisting>
- </para>
-
- <para>
-  How to add a new (major) version of the Linux kernel to Nixpkgs:
-  <orderedlist>
-   <listitem>
-    <para>
-     Copy the old Nix expression (e.g. <filename>linux-2.6.21.nix</filename>) to the new one (e.g. <filename>linux-2.6.22.nix</filename>) and update it.
-    </para>
-   </listitem>
-   <listitem>
-    <para>
-     Add the new kernel to <filename>all-packages.nix</filename> (e.g., create an attribute <varname>kernel_2_6_22</varname>).
-    </para>
-   </listitem>
-   <listitem>
-    <para>
-     Now we’re going to update the kernel configuration. First unpack the kernel. Then for each supported platform (<literal>i686</literal>, <literal>x86_64</literal>, <literal>uml</literal>) do the following:
-     <orderedlist>
-      <listitem>
-       <para>
-        Make an copy from the old config (e.g. <filename>config-2.6.21-i686-smp</filename>) to the new one (e.g. <filename>config-2.6.22-i686-smp</filename>).
-       </para>
-      </listitem>
-      <listitem>
-       <para>
-        Copy the config file for this platform (e.g. <filename>config-2.6.22-i686-smp</filename>) to <filename>.config</filename> in the kernel source tree.
-       </para>
-      </listitem>
-      <listitem>
-       <para>
-        Run <literal>make oldconfig ARCH=<replaceable>{i386,x86_64,um}</replaceable></literal> and answer all questions. (For the uml configuration, also add <literal>SHELL=bash</literal>.) Make sure to keep the configuration consistent between platforms (i.e. don’t enable some feature on <literal>i686</literal> and disable it on <literal>x86_64</literal>).
-       </para>
-      </listitem>
-      <listitem>
-       <para>
-        If needed you can also run <literal>make menuconfig</literal>:
-<screen>
-<prompt>$ </prompt>nix-env -i ncurses
-<prompt>$ </prompt>export NIX_CFLAGS_LINK=-lncurses
-<prompt>$ </prompt>make menuconfig ARCH=<replaceable>arch</replaceable></screen>
-       </para>
-      </listitem>
-      <listitem>
-       <para>
-        Copy <filename>.config</filename> over the new config file (e.g. <filename>config-2.6.22-i686-smp</filename>).
-       </para>
-      </listitem>
-     </orderedlist>
-    </para>
-   </listitem>
-   <listitem>
-    <para>
-     Test building the kernel: <literal>nix-build -A kernel_2_6_22</literal>. If it compiles, ship it! For extra credit, try booting NixOS with it.
-    </para>
-   </listitem>
-   <listitem>
-    <para>
-     It may be that the new kernel requires updating the external kernel modules and kernel-dependent packages listed in the <varname>linuxPackagesFor</varname> function in <filename>all-packages.nix</filename> (such as the NVIDIA drivers, AUFS, etc.). If the updated packages aren’t backwards compatible with older kernels, you may need to keep the older versions around.
-    </para>
-   </listitem>
-  </orderedlist>
- </para>
-</section>
diff --git a/doc/builders/packages/nginx.section.md b/doc/builders/packages/nginx.section.md
new file mode 100644
index 000000000000..154c21f9b369
--- /dev/null
+++ b/doc/builders/packages/nginx.section.md
@@ -0,0 +1,11 @@
+# Nginx {#sec-nginx}
+
+[Nginx](https://nginx.org) is a reverse proxy and lightweight webserver.
+
+## ETags on static files served from the Nix store {#sec-nginx-etag}
+
+HTTP has a couple different mechanisms for caching to prevent clients from having to download the same content repeatedly if a resource has not changed since the last time it was requested. When nginx is used as a server for static files, it implements the caching mechanism based on the [`Last-Modified`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Last-Modified) response header automatically; unfortunately, it works by using filesystem timestamps to determine the value of the `Last-Modified` header. This doesn't give the desired behavior when the file is in the Nix store, because all file timestamps are set to 0 (for reasons related to build reproducibility).
+
+Fortunately, HTTP supports an alternative (and more effective) caching mechanism: the [`ETag`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag) response header. The value of the `ETag` header specifies some identifier for the particular content that the server is sending (e.g. a hash). When a client makes a second request for the same resource, it sends that value back in an `If-None-Match` header. If the ETag value is unchanged, then the server does not need to resend the content.
+
+As of NixOS 19.09, the nginx package in Nixpkgs is patched such that when nginx serves a file out of `/nix/store`, the hash in the store path is used as the `ETag` header in the HTTP response, thus providing proper caching functionality. This happens automatically; you do not need to do modify any configuration to get this behavior.
diff --git a/doc/builders/packages/nginx.xml b/doc/builders/packages/nginx.xml
deleted file mode 100644
index 65854ba02366..000000000000
--- a/doc/builders/packages/nginx.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<section xmlns="http://docbook.org/ns/docbook"
-         xmlns:xlink="http://www.w3.org/1999/xlink"
-         xml:id="sec-nginx">
- <title>Nginx</title>
-
- <para>
-  <link xlink:href="https://nginx.org/">Nginx</link> is a reverse proxy and lightweight webserver.
- </para>
-
- <section xml:id="sec-nginx-etag">
-  <title>ETags on static files served from the Nix store</title>
-
-  <para>
-   HTTP has a couple different mechanisms for caching to prevent clients from having to download the same content repeatedly if a resource has not changed since the last time it was requested. When nginx is used as a server for static files, it implements the caching mechanism based on the <link xlink:href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Last-Modified"><literal>Last-Modified</literal></link> response header automatically; unfortunately, it works by using filesystem timestamps to determine the value of the <literal>Last-Modified</literal> header. This doesn't give the desired behavior when the file is in the Nix store, because all file timestamps are set to 0 (for reasons related to build reproducibility).
-  </para>
-
-  <para>
-   Fortunately, HTTP supports an alternative (and more effective) caching mechanism: the <link xlink:href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag"><literal>ETag</literal></link> response header. The value of the <literal>ETag</literal> header specifies some identifier for the particular content that the server is sending (e.g. a hash). When a client makes a second request for the same resource, it sends that value back in an <literal>If-None-Match</literal> header. If the ETag value is unchanged, then the server does not need to resend the content.
-  </para>
-
-  <para>
-   As of NixOS 19.09, the nginx package in Nixpkgs is patched such that when nginx serves a file out of <filename>/nix/store</filename>, the hash in the store path is used as the <literal>ETag</literal> header in the HTTP response, thus providing proper caching functionality. This happens automatically; you do not need to do modify any configuration to get this behavior.
-  </para>
- </section>
-</section>
diff --git a/doc/builders/packages/urxvt.section.md b/doc/builders/packages/urxvt.section.md
new file mode 100644
index 000000000000..2d1196d92278
--- /dev/null
+++ b/doc/builders/packages/urxvt.section.md
@@ -0,0 +1,71 @@
+# Urxvt {#sec-urxvt}
+
+Urxvt, also known as rxvt-unicode, is a highly customizable terminal emulator.
+
+## Configuring urxvt {#sec-urxvt-conf}
+
+In `nixpkgs`, urxvt is provided by the package `rxvt-unicode`. It can be configured to include your choice of plugins, reducing its closure size from the default configuration which includes all available plugins. To make use of this functionality, use an overlay or directly install an expression that overrides its configuration, such as
+
+```nix
+rxvt-unicode.override {
+  configure = { availablePlugins, ... }: {
+    plugins = with availablePlugins; [ perls resize-font vtwheel ];
+  };
+}
+```
+
+If the `configure` function returns an attrset without the `plugins` attribute, `availablePlugins` will be used automatically.
+
+In order to add plugins but also keep all default plugins installed, it is possible to use the following method:
+
+```nix
+rxvt-unicode.override {
+  configure = { availablePlugins, ... }: {
+    plugins = (builtins.attrValues availablePlugins) ++ [ custom-plugin ];
+  };
+}
+```
+
+To get a list of all the plugins available, open the Nix REPL and run
+
+```ShellSession
+$ nix repl
+:l <nixpkgs>
+map (p: p.name) pkgs.rxvt-unicode.plugins
+```
+
+Alternatively, if your shell is bash or zsh and have completion enabled, simply type `nixpkgs.rxvt-unicode.plugins.<tab>`.
+
+In addition to `plugins` the options `extraDeps` and `perlDeps` can be used to install extra packages. `extraDeps` can be used, for example, to provide `xsel` (a clipboard manager) to the clipboard plugin, without installing it globally:
+
+```nix
+rxvt-unicode.override {
+  configure = { availablePlugins, ... }: {
+    pluginsDeps = [ xsel ];
+  };
+}
+```
+
+`perlDeps` is a handy way to provide Perl packages to your custom plugins (in `$HOME/.urxvt/ext`). For example, if you need `AnyEvent` you can do:
+
+```nix
+rxvt-unicode.override {
+  configure = { availablePlugins, ... }: {
+    perlDeps = with perlPackages; [ AnyEvent ];
+  };
+}
+```
+
+## Packaging urxvt plugins {#sec-urxvt-pkg}
+
+Urxvt plugins resides in `pkgs/applications/misc/rxvt-unicode-plugins`. To add a new plugin create an expression in a subdirectory and add the package to the set in `pkgs/applications/misc/rxvt-unicode-plugins/default.nix`.
+
+A plugin can be any kind of derivation, the only requirement is that it should always install perl scripts in `$out/lib/urxvt/perl`. Look for existing plugins for examples.
+
+If the plugin is itself a perl package that needs to be imported from other plugins or scripts, add the following passthrough:
+
+```nix
+passthru.perlPackages = [ "self" ];
+```
+
+This will make the urxvt wrapper pick up the dependency and set up the perl path accordingly.
diff --git a/doc/builders/packages/urxvt.xml b/doc/builders/packages/urxvt.xml
deleted file mode 100644
index 330e056b6560..000000000000
--- a/doc/builders/packages/urxvt.xml
+++ /dev/null
@@ -1,115 +0,0 @@
-<section xmlns="http://docbook.org/ns/docbook"
-         xmlns:xlink="http://www.w3.org/1999/xlink"
-         xml:id="sec-urxvt">
- <title>Urxvt</title>
-
- <para>
-  Urxvt, also known as rxvt-unicode, is a highly customizable terminal emulator.
- </para>
-
- <section xml:id="sec-urxvt-conf">
-
-  <title>Configuring urxvt</title>
-
-  <para>
-   In <literal>nixpkgs</literal>, urxvt is provided by the package
-   <literal>rxvt-unicode</literal>. It can be configured to include your choice
-   of plugins, reducing its closure size from the default configuration which
-   includes all available plugins. To make use of this functionality, use an
-   overlay or directly install an expression that overrides its configuration,
-   such as
-<programlisting>
-rxvt-unicode.override {
-  configure = { availablePlugins, ... }: {
-    plugins = with availablePlugins; [ perls resize-font vtwheel ];
-  };
-}
-</programlisting>
-   If the <literal>configure</literal> function returns an attrset without the
-   <literal>plugins</literal> attribute, <literal>availablePlugins</literal>
-   will be used automatically.
-  </para>
-
-  <para>
-   In order to add plugins but also keep all default plugins installed, it is
-   possible to use the following method:
-<programlisting>
-rxvt-unicode.override {
-  configure = { availablePlugins, ... }: {
-    plugins = (builtins.attrValues availablePlugins) ++ [ custom-plugin ];
-  };
-}
-</programlisting>
-  </para>
-
-  <para>
-   To get a list of all the plugins available, open the Nix REPL and run
-<screen>
-<prompt>$ </prompt>nix repl
-:l &lt;nixpkgs&gt;
-map (p: p.name) pkgs.rxvt-unicode.plugins
-</screen>
-   Alternatively, if your shell is bash or zsh and have completion enabled,
-   simply type <literal>nixpkgs.rxvt-unicode.plugins.&lt;tab&gt;</literal>.
-  </para>
-
-  <para>
-    In addition to <literal>plugins</literal> the options
-    <literal>extraDeps</literal> and <literal>perlDeps</literal> can be used
-    to install extra packages.
-    <literal>extraDeps</literal> can be used, for example, to provide
-    <literal>xsel</literal> (a clipboard manager) to the clipboard plugin,
-    without installing it globally:
-<programlisting>
-rxvt-unicode.override {
-  configure = { availablePlugins, ... }: {
-    pluginsDeps = [ xsel ];
-  };
-}
-</programlisting>
-
-    <literal>perlDeps</literal> is a handy way to provide Perl packages to
-    your custom plugins (in <literal>$HOME/.urxvt/ext</literal>). For example,
-    if you need <literal>AnyEvent</literal> you can do:
-<programlisting>
-rxvt-unicode.override {
-  configure = { availablePlugins, ... }: {
-    perlDeps = with perlPackages; [ AnyEvent ];
-  };
-}
-</programlisting>
-  </para>
-
- </section>
-
- <section xml:id="sec-urxvt-pkg">
-
-  <title>Packaging urxvt plugins</title>
-
-  <para>
-   Urxvt plugins resides in
-   <literal>pkgs/applications/misc/rxvt-unicode-plugins</literal>.
-   To add a new plugin create an expression in a subdirectory and add the
-   package to the set in
-   <literal>pkgs/applications/misc/rxvt-unicode-plugins/default.nix</literal>.
-  </para>
-
-  <para>
-   A plugin can be any kind of derivation, the only requirement is that it
-   should always install perl scripts in <literal>$out/lib/urxvt/perl</literal>.
-   Look for existing plugins for examples.
-  </para>
-
-  <para>
-   If the plugin is itself a perl package that needs to be imported from
-   other plugins or scripts, add the following passthrough:
-<programlisting>
-passthru.perlPackages = [ "self" ];
-</programlisting>
-   This will make the urxvt wrapper pick up the dependency and set up the perl
-   path accordingly.
-  </para>
-
- </section>
-
-</section>
diff --git a/doc/languages-frameworks/index.xml b/doc/languages-frameworks/index.xml
index b4d842f69f8a..daa57cf1f865 100644
--- a/doc/languages-frameworks/index.xml
+++ b/doc/languages-frameworks/index.xml
@@ -29,7 +29,7 @@
  <xi:include href="r.section.xml" />
  <xi:include href="ruby.section.xml" />
  <xi:include href="rust.section.xml" />
- <xi:include href="texlive.xml" />
+ <xi:include href="texlive.section.xml" />
  <xi:include href="titanium.section.xml" />
  <xi:include href="vim.section.xml" />
 </chapter>
diff --git a/doc/languages-frameworks/texlive.section.md b/doc/languages-frameworks/texlive.section.md
new file mode 100644
index 000000000000..9584c56bb52f
--- /dev/null
+++ b/doc/languages-frameworks/texlive.section.md
@@ -0,0 +1,128 @@
+
+# TeX Live {#sec-language-texlive}
+
+Since release 15.09 there is a new TeX Live packaging that lives entirely under attribute `texlive`.
+
+## User's guide {#sec-language-texlive-user-guide}
+
+- For basic usage just pull `texlive.combined.scheme-basic` for an environment with basic LaTeX support.
+- It typically won't work to use separately installed packages together. Instead, you can build a custom set of packages like this:
+
+  ```nix
+  texlive.combine {
+    inherit (texlive) scheme-small collection-langkorean algorithms cm-super;
+  }
+  ```
+
+- There are all the schemes, collections and a few thousand packages, as defined upstream (perhaps with tiny differences).
+- By default you only get executables and files needed during runtime, and a little documentation for the core packages. To change that, you need to add `pkgFilter` function to `combine`.
+
+  ```nix
+  texlive.combine {
+    # inherit (texlive) whatever-you-want;
+    pkgFilter = pkg:
+      pkg.tlType == "run" || pkg.tlType == "bin" || pkg.pname == "cm-super";
+    # elem tlType [ "run" "bin" "doc" "source" ]
+    # there are also other attributes: version, name
+  }
+  ```
+
+- You can list packages e.g. by `nix repl`.
+
+  ```ShellSession
+  $ nix repl
+  nix-repl> :l <nixpkgs>
+  nix-repl> texlive.collection-[TAB]
+  ```
+
+- Note that the wrapper assumes that the result has a chance to be useful. For example, the core executables should be present, as well as some core data files. The supported way of ensuring this is by including some scheme, for example `scheme-basic`, into the combination.
+
+## Custom packages {#sec-language-texlive-custom-packages}
+
+
+You may find that you need to use an external TeX package. A derivation for such package has to provide contents of the "texmf" directory in its output and provide the `tlType` attribute. Here is a (very verbose) example:
+
+```nix
+with import <nixpkgs> {};
+
+let
+  foiltex_run = stdenvNoCC.mkDerivation {
+    pname = "latex-foiltex";
+    version = "2.1.4b";
+    passthru.tlType = "run";
+
+    srcs = [
+      (fetchurl {
+        url = "http://mirrors.ctan.org/macros/latex/contrib/foiltex/foiltex.dtx";
+        sha256 = "07frz0krpz7kkcwlayrwrj2a2pixmv0icbngyw92srp9fp23cqpz";
+      })
+      (fetchurl {
+        url = "http://mirrors.ctan.org/macros/latex/contrib/foiltex/foiltex.ins";
+        sha256 = "09wkyidxk3n3zvqxfs61wlypmbhi1pxmjdi1kns9n2ky8ykbff99";
+      })
+    ];
+
+    unpackPhase = ''
+      runHook preUnpack
+
+      for _src in $srcs; do
+        cp "$_src" $(stripHash "$_src")
+      done
+
+      runHook postUnpack
+    '';
+
+    nativeBuildInputs = [ texlive.combined.scheme-small ];
+
+    dontConfigure = true;
+
+    buildPhase = ''
+      runHook preBuild
+
+      # Generate the style files
+      latex foiltex.ins
+
+      runHook postBuild
+    '';
+
+    installPhase = ''
+      runHook preInstall
+
+      path="$out/tex/latex/foiltex"
+      mkdir -p "$path"
+      cp *.{cls,def,clo} "$path/"
+
+      runHook postInstall
+    '';
+
+    meta = with lib; {
+      description = "A LaTeX2e class for overhead transparencies";
+      license = licenses.unfreeRedistributable;
+      maintainers = with maintainers; [ veprbl ];
+      platforms = platforms.all;
+    };
+  };
+  foiltex = { pkgs = [ foiltex_run ]; };
+
+  latex_with_foiltex = texlive.combine {
+    inherit (texlive) scheme-small;
+    inherit foiltex;
+  };
+in
+  runCommand "test.pdf" {
+    nativeBuildInputs = [ latex_with_foiltex ];
+  } ''
+cat >test.tex <<EOF
+\documentclass{foils}
+
+\title{Presentation title}
+\date{}
+
+\begin{document}
+\maketitle
+\end{document}
+EOF
+  pdflatex test.tex
+  cp test.pdf $out
+''
+```
diff --git a/doc/languages-frameworks/texlive.xml b/doc/languages-frameworks/texlive.xml
deleted file mode 100644
index 141c46e5a623..000000000000
--- a/doc/languages-frameworks/texlive.xml
+++ /dev/null
@@ -1,152 +0,0 @@
-<section xmlns="http://docbook.org/ns/docbook"
-         xmlns:xlink="http://www.w3.org/1999/xlink"
-         xml:id="sec-language-texlive">
- <title>TeX Live</title>
-
- <para>
-  Since release 15.09 there is a new TeX Live packaging that lives entirely under attribute <varname>texlive</varname>.
- </para>
-
- <section xml:id="sec-language-texlive-users-guide">
-  <title>User's guide</title>
-
-  <itemizedlist>
-   <listitem>
-    <para>
-     For basic usage just pull <varname>texlive.combined.scheme-basic</varname> for an environment with basic LaTeX support.
-    </para>
-   </listitem>
-   <listitem>
-    <para>
-     It typically won't work to use separately installed packages together. Instead, you can build a custom set of packages like this:
-<programlisting>
-texlive.combine {
-  inherit (texlive) scheme-small collection-langkorean algorithms cm-super;
-}
-</programlisting>
-     There are all the schemes, collections and a few thousand packages, as defined upstream (perhaps with tiny differences).
-    </para>
-   </listitem>
-   <listitem>
-    <para>
-     By default you only get executables and files needed during runtime, and a little documentation for the core packages. To change that, you need to add <varname>pkgFilter</varname> function to <varname>combine</varname>.
-<programlisting>
-texlive.combine {
-  # inherit (texlive) whatever-you-want;
-  pkgFilter = pkg:
-    pkg.tlType == "run" || pkg.tlType == "bin" || pkg.pname == "cm-super";
-  # elem tlType [ "run" "bin" "doc" "source" ]
-  # there are also other attributes: version, name
-}
-</programlisting>
-    </para>
-   </listitem>
-   <listitem>
-    <para>
-     You can list packages e.g. by <command>nix repl</command>.
-<programlisting>
-<prompt>$ </prompt>nix repl
-<prompt>nix-repl> </prompt>:l &lt;nixpkgs>
-<prompt>nix-repl> </prompt>texlive.collection-<keycap function="tab" />
-</programlisting>
-    </para>
-   </listitem>
-   <listitem>
-    <para>
-     Note that the wrapper assumes that the result has a chance to be useful. For example, the core executables should be present, as well as some core data files. The supported way of ensuring this is by including some scheme, for example <varname>scheme-basic</varname>, into the combination.
-    </para>
-   </listitem>
-  </itemizedlist>
- </section>
-
- <section xml:id="sec-language-texlive-custom-packages">
-  <title>Custom packages</title>
-  <para>
-    You may find that you need to use an external TeX package. A derivation for such package has to provide contents of the "texmf" directory in its output and provide the <varname>tlType</varname> attribute. Here is a (very verbose) example:
-<programlisting><![CDATA[
-with import <nixpkgs> {};
-
-let
-  foiltex_run = stdenvNoCC.mkDerivation {
-    pname = "latex-foiltex";
-    version = "2.1.4b";
-    passthru.tlType = "run";
-
-    srcs = [
-      (fetchurl {
-        url = "http://mirrors.ctan.org/macros/latex/contrib/foiltex/foiltex.dtx";
-        sha256 = "07frz0krpz7kkcwlayrwrj2a2pixmv0icbngyw92srp9fp23cqpz";
-      })
-      (fetchurl {
-        url = "http://mirrors.ctan.org/macros/latex/contrib/foiltex/foiltex.ins";
-        sha256 = "09wkyidxk3n3zvqxfs61wlypmbhi1pxmjdi1kns9n2ky8ykbff99";
-      })
-    ];
-
-    unpackPhase = ''
-      runHook preUnpack
-
-      for _src in $srcs; do
-        cp "$_src" $(stripHash "$_src")
-      done
-
-      runHook postUnpack
-    '';
-
-    nativeBuildInputs = [ texlive.combined.scheme-small ];
-
-    dontConfigure = true;
-
-    buildPhase = ''
-      runHook preBuild
-
-      # Generate the style files
-      latex foiltex.ins
-
-      runHook postBuild
-    '';
-
-    installPhase = ''
-      runHook preInstall
-
-      path="$out/tex/latex/foiltex"
-      mkdir -p "$path"
-      cp *.{cls,def,clo} "$path/"
-
-      runHook postInstall
-    '';
-
-    meta = with lib; {
-      description = "A LaTeX2e class for overhead transparencies";
-      license = licenses.unfreeRedistributable;
-      maintainers = with maintainers; [ veprbl ];
-      platforms = platforms.all;
-    };
-  };
-  foiltex = { pkgs = [ foiltex_run ]; };
-
-  latex_with_foiltex = texlive.combine {
-    inherit (texlive) scheme-small;
-    inherit foiltex;
-  };
-in
-  runCommand "test.pdf" {
-    nativeBuildInputs = [ latex_with_foiltex ];
-  } ''
-cat >test.tex <<EOF
-\documentclass{foils}
-
-\title{Presentation title}
-\date{}
-
-\begin{document}
-\maketitle
-\end{document}
-EOF
-  pdflatex test.tex
-  cp test.pdf $out
-''
-]]></programlisting>
-  </para>
- </section>
-</section>