Skip to content

Instantly share code, notes, and snippets.

@samueldr
Created June 1, 2018 01:06
Show Gist options
  • Save samueldr/43df6b95da84c470287feb1b080952d2 to your computer and use it in GitHub Desktop.
Save samueldr/43df6b95da84c470287feb1b080952d2 to your computer and use it in GitHub Desktop.
diff --git a/nixos/doc/manual/development/option-types.xml b/nixos/doc/manual/development/option-types.xml
index 47dd09158e9..f0a86b167ff 100644
--- a/nixos/doc/manual/development/option-types.xml
+++ b/nixos/doc/manual/development/option-types.xml
@@ -1,8 +1,4 @@
-<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-option-types">
+<section xml:id="sec-option-types" version="5.0" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://docbook.org/ns/docbook">
<title>Options Types</title>
<para>
@@ -249,8 +245,7 @@
<replaceable>o</replaceable> can be an attribute set or a function
returning an attribute set. Submodules are used in composed types to
create modular options. Submodule are detailed in
- <xref
- linkend='section-option-types-submodule' />.
+ <xref linkend="section-option-types-submodule"/>.
</para>
</listitem>
</varlistentry>
@@ -353,7 +348,7 @@
</variablelist>
</section>
- <section xml:id='section-option-types-submodule'>
+ <section xml:id="section-option-types-submodule">
<title>Submodule</title>
<para>
@@ -371,11 +366,11 @@
<para>
The option set can be defined directly
- (<xref linkend='ex-submodule-direct' />) or as reference
- (<xref linkend='ex-submodule-reference' />).
+ (<xref linkend="ex-submodule-direct"/>) or as reference
+ (<xref linkend="ex-submodule-reference"/>).
</para>
- <example xml:id='ex-submodule-direct'>
+ <example xml:id="ex-submodule-direct">
<title>Directly defined submodule</title>
<screen>
options.mod = mkOption {
@@ -393,7 +388,7 @@ options.mod = mkOption {
};</screen>
</example>
- <example xml:id='ex-submodule-reference'>
+ <example xml:id="ex-submodule-reference">
<title>Submodule defined as a reference</title>
<screen>
let
@@ -418,12 +413,12 @@ options.mod = mkOption {
The <literal>submodule</literal> type is especially interesting when used
with composed types like <literal>attrsOf</literal> or
<literal>listOf</literal>. When composed with <literal>listOf</literal>
- (<xref linkend='ex-submodule-listof-declaration' />),
+ (<xref linkend="ex-submodule-listof-declaration"/>),
<literal>submodule</literal> allows multiple definitions of the submodule
- option set (<xref linkend='ex-submodule-listof-definition' />).
+ option set (<xref linkend="ex-submodule-listof-definition"/>).
</para>
- <example xml:id='ex-submodule-listof-declaration'>
+ <example xml:id="ex-submodule-listof-declaration">
<title>Declaration of a list of submodules</title>
<screen>
options.mod = mkOption {
@@ -441,7 +436,7 @@ options.mod = mkOption {
};</screen>
</example>
- <example xml:id='ex-submodule-listof-definition'>
+ <example xml:id="ex-submodule-listof-definition">
<title>Definition of a list of submodules</title>
<screen>
config.mod = [
@@ -452,12 +447,12 @@ config.mod = [
<para>
When composed with <literal>attrsOf</literal>
- (<xref linkend='ex-submodule-attrsof-declaration' />),
+ (<xref linkend="ex-submodule-attrsof-declaration"/>),
<literal>submodule</literal> allows multiple named definitions of the
- submodule option set (<xref linkend='ex-submodule-attrsof-definition' />).
+ submodule option set (<xref linkend="ex-submodule-attrsof-definition"/>).
</para>
- <example xml:id='ex-submodule-attrsof-declaration'>
+ <example xml:id="ex-submodule-attrsof-declaration">
<title>Declaration of attribute sets of submodules</title>
<screen>
options.mod = mkOption {
@@ -475,7 +470,7 @@ options.mod = mkOption {
};</screen>
</example>
- <example xml:id='ex-submodule-attrsof-definition'>
+ <example xml:id="ex-submodule-attrsof-definition">
<title>Declaration of attribute sets of submodules</title>
<screen>
config.mod.one = { foo = 1; bar = "one"; };
@@ -501,12 +496,11 @@ config.mod.two = { foo = 2; bar = "two"; };</screen>
The function to type check the value. Takes a value as parameter and
return a boolean. It is possible to extend a type check with the
<literal>addCheck</literal> function
- (<xref
- linkend='ex-extending-type-check-1' />), or to fully
+ (<xref linkend="ex-extending-type-check-1"/>), or to fully
override the check function
- (<xref linkend='ex-extending-type-check-2' />).
+ (<xref linkend="ex-extending-type-check-2"/>).
</para>
- <example xml:id='ex-extending-type-check-1'>
+ <example xml:id="ex-extending-type-check-1">
<title>Adding a type check</title>
<screen>
byte = mkOption {
@@ -514,7 +508,7 @@ byte = mkOption {
type = addCheck types.int (x: x &gt;= 0 &amp;&amp; x &lt;= 255);
};</screen>
</example>
- <example xml:id='ex-extending-type-check-2'>
+ <example xml:id="ex-extending-type-check-2">
<title>Overriding a type check</title>
<screen>
nixThings = mkOption {
@@ -550,8 +544,7 @@ nixThings = mkOption {
Custom types can be created with the <literal>mkOptionType</literal>
function. As type creation includes some more complex topics such as
submodule handling, it is recommended to get familiar with
- <filename
- xlink:href="https://github.com/NixOS/nixpkgs/blob/master/lib/types.nix">types.nix</filename>
+ <filename xlink:href="https://github.com/NixOS/nixpkgs/blob/master/lib/types.nix">types.nix</filename>
code before creating a new type.
</para>
diff --git a/nixos/doc/manual/man-nixos-install.xml b/nixos/doc/manual/man-nixos-install.xml
index 25f4f40613a..e6e53f0e3bd 100644
--- a/nixos/doc/manual/man-nixos-install.xml
+++ b/nixos/doc/manual/man-nixos-install.xml
@@ -1,6 +1,4 @@
-<refentry xmlns="http://docbook.org/ns/docbook"
- xmlns:xlink="http://www.w3.org/1999/xlink"
- xmlns:xi="http://www.w3.org/2001/XInclude">
+<refentry xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://docbook.org/ns/docbook">
<refmeta>
<refentrytitle><command>nixos-install</command>
</refentrytitle><manvolnum>8</manvolnum>
@@ -15,51 +13,51 @@
<cmdsynopsis>
<command>nixos-install</command>
<arg>
- <arg choice='plain'>
+ <arg choice="plain">
<option>-I</option>
</arg>
<replaceable>path</replaceable>
</arg>
<arg>
- <arg choice='plain'>
+ <arg choice="plain">
<option>--root</option>
</arg>
<replaceable>root</replaceable>
</arg>
<arg>
- <arg choice='plain'>
+ <arg choice="plain">
<option>--system</option>
</arg>
<replaceable>path</replaceable>
</arg>
<arg>
- <arg choice='plain'>
+ <arg choice="plain">
<option>--no-channel-copy</option>
</arg>
</arg>
<arg>
- <arg choice='plain'>
+ <arg choice="plain">
<option>--no-root-passwd</option>
</arg>
</arg>
<arg>
- <arg choice='plain'>
+ <arg choice="plain">
<option>--no-bootloader</option>
</arg>
</arg>
<arg>
- <group choice='req'>
- <arg choice='plain'>
+ <group choice="req">
+ <arg choice="plain">
<option>--max-jobs</option>
</arg>
- <arg choice='plain'>
+ <arg choice="plain">
<option>-j</option>
</arg>
</group> <replaceable>number</replaceable>
@@ -74,13 +72,13 @@
</arg>
<arg>
- <arg choice='plain'>
+ <arg choice="plain">
<option>--show-trace</option>
</arg>
</arg>
<arg>
- <arg choice='plain'>
+ <arg choice="plain">
<option>--help</option>
</arg>
</arg>
diff --git a/nixos/doc/manual/man-nixos-option.xml b/nixos/doc/manual/man-nixos-option.xml
index d436cce742a..aa8f5872bdc 100644
--- a/nixos/doc/manual/man-nixos-option.xml
+++ b/nixos/doc/manual/man-nixos-option.xml
@@ -1,6 +1,4 @@
-<refentry xmlns="http://docbook.org/ns/docbook"
- xmlns:xlink="http://www.w3.org/1999/xlink"
- xmlns:xi="http://www.w3.org/2001/XInclude">
+<refentry xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://docbook.org/ns/docbook">
<refmeta>
<refentrytitle><command>nixos-option</command>
</refentrytitle><manvolnum>8</manvolnum>
diff --git a/nixos/doc/manual/man-nixos-rebuild.xml b/nixos/doc/manual/man-nixos-rebuild.xml
index 551a65f5e96..f2f9b59ff2f 100644
--- a/nixos/doc/manual/man-nixos-rebuild.xml
+++ b/nixos/doc/manual/man-nixos-rebuild.xml
@@ -1,6 +1,4 @@
-<refentry xmlns="http://docbook.org/ns/docbook"
- xmlns:xlink="http://www.w3.org/1999/xlink"
- xmlns:xi="http://www.w3.org/2001/XInclude">
+<refentry xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://docbook.org/ns/docbook">
<refmeta>
<refentrytitle><command>nixos-rebuild</command>
</refentrytitle><manvolnum>8</manvolnum>
@@ -13,40 +11,40 @@
</refnamediv>
<refsynopsisdiv>
<cmdsynopsis>
- <command>nixos-rebuild</command><group choice='req'>
- <arg choice='plain'>
+ <command>nixos-rebuild</command><group choice="req">
+ <arg choice="plain">
<option>switch</option>
</arg>
- <arg choice='plain'>
+ <arg choice="plain">
<option>boot</option>
</arg>
- <arg choice='plain'>
+ <arg choice="plain">
<option>test</option>
</arg>
- <arg choice='plain'>
+ <arg choice="plain">
<option>build</option>
</arg>
- <arg choice='plain'>
+ <arg choice="plain">
<option>dry-build</option>
</arg>
- <arg choice='plain'>
+ <arg choice="plain">
<option>dry-activate</option>
</arg>
- <arg choice='plain'>
+ <arg choice="plain">
<option>build-vm</option>
</arg>
- <arg choice='plain'>
+ <arg choice="plain">
<option>build-vm-with-bootloader</option>
</arg>
</group>
- <sbr />
+ <sbr/>
<arg>
<option>--upgrade</option>
</arg>
@@ -66,19 +64,19 @@
<arg>
<option>--rollback</option>
</arg>
- <sbr />
+ <sbr/>
<arg>
- <group choice='req'>
- <arg choice='plain'>
+ <group choice="req">
+ <arg choice="plain">
<option>--profile-name</option>
</arg>
- <arg choice='plain'>
+ <arg choice="plain">
<option>-p</option>
</arg>
</group> <replaceable>name</replaceable>
</arg>
- <sbr />
+ <sbr/>
<arg>
<option>--show-trace</option>
</arg>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment