summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpennae <82953136+pennae@users.noreply.github.com>2023-01-13 13:29:01 +0100
committerGitHub <noreply@github.com>2023-01-13 13:29:01 +0100
commitd6e464b4c51bcb732b09d8fdf99b7ca54bea97e4 (patch)
treefa1bf1822761f5d666cd88af148ca9389c18296b
parente495e5dfa6818c5392ed627df836ee50a7f540fe (diff)
parent53fc887582fba4fd4938ce1b647d6152ea374ed1 (diff)
Merge pull request #208983 from pennae/nixos-manual-md
nixos/manual: convert module chapters to markdown
-rw-r--r--doc/build-aux/pandoc-filters/myst-reader/roles.lua13
-rw-r--r--nixos/doc/manual/development/meta-attributes.section.md20
-rw-r--r--nixos/doc/manual/from_md/development/meta-attributes.section.xml21
-rwxr-xr-xnixos/doc/manual/md-to-db.sh18
-rw-r--r--nixos/modules/i18n/input-method/default.md158
-rw-r--r--nixos/modules/i18n/input-method/default.xml482
-rw-r--r--nixos/modules/programs/digitalbitbox/default.md47
-rw-r--r--nixos/modules/programs/digitalbitbox/default.nix2
-rw-r--r--nixos/modules/programs/digitalbitbox/default.xml70
-rw-r--r--nixos/modules/programs/digitalbitbox/doc.xml74
-rw-r--r--nixos/modules/programs/plotinus.md17
-rw-r--r--nixos/modules/programs/plotinus.xml56
-rw-r--r--nixos/modules/programs/zsh/oh-my-zsh.md109
-rw-r--r--nixos/modules/programs/zsh/oh-my-zsh.xml229
-rw-r--r--nixos/modules/security/acme/default.md354
-rw-r--r--nixos/modules/security/acme/default.nix2
-rw-r--r--nixos/modules/security/acme/default.xml395
-rw-r--r--nixos/modules/security/acme/doc.xml414
-rw-r--r--nixos/modules/services/backup/borgbackup.md163
-rw-r--r--nixos/modules/services/backup/borgbackup.xml322
-rw-r--r--nixos/modules/services/databases/foundationdb.md309
-rw-r--r--nixos/modules/services/databases/foundationdb.xml734
-rw-r--r--nixos/modules/services/databases/postgresql.md173
-rw-r--r--nixos/modules/services/databases/postgresql.xml345
-rw-r--r--nixos/modules/services/desktops/flatpak.md39
-rw-r--r--nixos/modules/services/desktops/flatpak.xml109
-rw-r--r--nixos/modules/services/development/blackfire.md39
-rw-r--r--nixos/modules/services/development/blackfire.xml63
-rw-r--r--nixos/modules/services/editors/emacs.md399
-rw-r--r--nixos/modules/services/editors/emacs.xml912
-rw-r--r--nixos/modules/services/hardware/trezord.md17
-rw-r--r--nixos/modules/services/hardware/trezord.xml51
-rw-r--r--nixos/modules/services/mail/mailman.md82
-rw-r--r--nixos/modules/services/mail/mailman.xml122
-rw-r--r--nixos/modules/services/matrix/mjolnir.md110
-rw-r--r--nixos/modules/services/matrix/mjolnir.xml188
-rw-r--r--nixos/modules/services/matrix/synapse.md216
-rw-r--r--nixos/modules/services/matrix/synapse.xml439
-rw-r--r--nixos/modules/services/misc/gitlab.md112
-rw-r--r--nixos/modules/services/misc/gitlab.xml256
-rw-r--r--nixos/modules/services/misc/sourcehut/default.md93
-rw-r--r--nixos/modules/services/misc/sourcehut/default.nix2
-rw-r--r--nixos/modules/services/misc/sourcehut/default.xml113
-rw-r--r--nixos/modules/services/misc/sourcehut/sourcehut.xml119
-rw-r--r--nixos/modules/services/misc/taskserver/default.md93
-rw-r--r--nixos/modules/services/misc/taskserver/default.nix2
-rw-r--r--nixos/modules/services/misc/taskserver/default.xml130
-rw-r--r--nixos/modules/services/misc/taskserver/doc.xml135
-rw-r--r--nixos/modules/services/misc/weechat.md46
-rw-r--r--nixos/modules/services/misc/weechat.xml97
-rw-r--r--nixos/modules/services/monitoring/parsedmarc.md4
-rw-r--r--nixos/modules/services/monitoring/parsedmarc.nix2
-rw-r--r--nixos/modules/services/monitoring/parsedmarc.xml12
-rw-r--r--nixos/modules/services/monitoring/prometheus/exporters.md180
-rw-r--r--nixos/modules/services/monitoring/prometheus/exporters.xml261
-rw-r--r--nixos/modules/services/network-filesystems/litestream/default.md (renamed from nixos/modules/services/network-filesystems/litestream/litestream.xml)33
-rw-r--r--nixos/modules/services/network-filesystems/litestream/default.nix3
-rw-r--r--nixos/modules/services/network-filesystems/litestream/default.xml62
-rw-r--r--nixos/modules/services/networking/firefox-syncserver.nix2
-rw-r--r--nixos/modules/services/networking/firefox-syncserver.xml2
-rw-r--r--nixos/modules/services/networking/mosquitto.nix2
-rw-r--r--nixos/modules/services/networking/mosquitto.xml8
-rw-r--r--nixos/modules/services/networking/pleroma.md180
-rw-r--r--nixos/modules/services/networking/pleroma.xml226
-rw-r--r--nixos/modules/services/networking/prosody.md72
-rw-r--r--nixos/modules/services/networking/prosody.nix1
-rw-r--r--nixos/modules/services/networking/prosody.xml155
-rw-r--r--nixos/modules/services/networking/yggdrasil.md141
-rw-r--r--nixos/modules/services/networking/yggdrasil.xml73
-rw-r--r--nixos/modules/services/search/meilisearch.md12
-rw-r--r--nixos/modules/services/search/meilisearch.nix2
-rw-r--r--nixos/modules/services/search/meilisearch.xml16
-rw-r--r--nixos/modules/services/web-apps/akkoma.xml4
-rw-r--r--nixos/modules/services/web-apps/discourse.md286
-rw-r--r--nixos/modules/services/web-apps/discourse.xml532
-rw-r--r--nixos/modules/services/web-apps/grocy.md66
-rw-r--r--nixos/modules/services/web-apps/grocy.xml101
-rw-r--r--nixos/modules/services/web-apps/jitsi-meet.md45
-rw-r--r--nixos/modules/services/web-apps/jitsi-meet.xml88
-rw-r--r--nixos/modules/services/web-apps/keycloak.md141
-rw-r--r--nixos/modules/services/web-apps/keycloak.xml369
-rw-r--r--nixos/modules/services/web-apps/lemmy.nix2
-rw-r--r--nixos/modules/services/web-apps/lemmy.xml2
-rw-r--r--nixos/modules/services/web-apps/matomo-doc.xml107
-rw-r--r--nixos/modules/services/web-apps/matomo.md77
-rw-r--r--nixos/modules/services/web-apps/matomo.nix2
-rw-r--r--nixos/modules/services/web-apps/matomo.xml107
-rw-r--r--nixos/modules/services/web-apps/nextcloud.md237
-rw-r--r--nixos/modules/services/web-apps/nextcloud.xml536
-rw-r--r--nixos/modules/services/web-apps/pict-rs.md1
-rw-r--r--nixos/modules/services/web-apps/pict-rs.nix2
-rw-r--r--nixos/modules/services/web-apps/pict-rs.xml47
-rw-r--r--nixos/modules/services/web-apps/plausible.md35
-rw-r--r--nixos/modules/services/web-apps/plausible.xml78
-rw-r--r--nixos/modules/services/web-servers/garage-doc.xml139
-rw-r--r--nixos/modules/services/web-servers/garage.md96
-rw-r--r--nixos/modules/services/web-servers/garage.nix2
-rw-r--r--nixos/modules/services/web-servers/garage.xml206
-rw-r--r--nixos/modules/services/x11/desktop-managers/gnome.md167
-rw-r--r--nixos/modules/services/x11/desktop-managers/gnome.xml434
-rw-r--r--nixos/modules/services/x11/desktop-managers/pantheon.md74
-rw-r--r--nixos/modules/services/x11/desktop-managers/pantheon.xml237
-rw-r--r--nixos/modules/system/boot/loader/external/external.md2
-rw-r--r--nixos/modules/system/boot/loader/external/external.nix2
-rw-r--r--nixos/modules/system/boot/loader/external/external.xml4
105 files changed, 9381 insertions, 4807 deletions
diff --git a/doc/build-aux/pandoc-filters/myst-reader/roles.lua b/doc/build-aux/pandoc-filters/myst-reader/roles.lua
index c33a688eeba7..f4ef6d390b40 100644
--- a/doc/build-aux/pandoc-filters/myst-reader/roles.lua
+++ b/doc/build-aux/pandoc-filters/myst-reader/roles.lua
@@ -17,9 +17,16 @@ function Inlines(inlines)
if correct_tags then
-- docutils supports alphanumeric strings separated by [-._:]
-- We are slightly more liberal for simplicity.
- local role = first.text:match('^{([-._+:%w]+)}$')
- if role ~= nil then
- inlines:remove(i)
+ -- Allow preceding punctuation (eg '('), otherwise '({file}`...`)'
+ -- does not match. Also allow anything followed by a non-breaking space
+ -- since pandoc emits those after certain abbreviations (e.g. e.g.).
+ local prefix, role = first.text:match('^(.*){([-._+:%w]+)}$')
+ if role ~= nil and (prefix == '' or prefix:match("^.*[%p ]$") ~= nil) then
+ if prefix == '' then
+ inlines:remove(i)
+ else
+ first.text = prefix
+ end
second.attributes['role'] = role
second.classes:insert('interpreted-text')
end
diff --git a/nixos/doc/manual/development/meta-attributes.section.md b/nixos/doc/manual/development/meta-attributes.section.md
index 946c08efd0a3..7129cf8723e6 100644
--- a/nixos/doc/manual/development/meta-attributes.section.md
+++ b/nixos/doc/manual/development/meta-attributes.section.md
@@ -40,6 +40,26 @@ file.
$ nix-build nixos/release.nix -A manual.x86_64-linux
```
+ This file should *not* usually be written by hand. Instead it is preferred
+ to write documentation using CommonMark and converting it to CommonMark
+ using pandoc. The simplest documentation can be converted using just
+
+ ```ShellSession
+ $ pandoc doc.md -t docbook --top-level-division=chapter -f markdown+smart > doc.xml
+ ```
+
+ More elaborate documentation may wish to add one or more of the pandoc
+ filters used to build the remainder of the manual, for example the GNOME
+ desktop uses
+
+ ```ShellSession
+ $ pandoc gnome.md -t docbook --top-level-division=chapter \
+ --extract-media=media -f markdown+smart \
+ --lua-filter ../../../../../doc/build-aux/pandoc-filters/myst-reader/roles.lua \
+ --lua-filter ../../../../../doc/build-aux/pandoc-filters/docbook-writer/rst-roles.lua \
+ > gnome.xml
+ ```
+
- `buildDocsInSandbox` indicates whether the option documentation for the
module can be built in a derivation sandbox. This option is currently only
honored for modules shipped by nixpkgs. User modules and modules taken from
diff --git a/nixos/doc/manual/from_md/development/meta-attributes.section.xml b/nixos/doc/manual/from_md/development/meta-attributes.section.xml
index 9cc58afa1fdd..450a5f670f3a 100644
--- a/nixos/doc/manual/from_md/development/meta-attributes.section.xml
+++ b/nixos/doc/manual/from_md/development/meta-attributes.section.xml
@@ -51,6 +51,27 @@
<programlisting>
$ nix-build nixos/release.nix -A manual.x86_64-linux
</programlisting>
+ <para>
+ This file should <emphasis>not</emphasis> usually be written by
+ hand. Instead it is preferred to write documentation using
+ CommonMark and converting it to CommonMark using pandoc. The
+ simplest documentation can be converted using just
+ </para>
+ <programlisting>
+$ pandoc doc.md -t docbook --top-level-division=chapter -f markdown+smart &gt; doc.xml
+</programlisting>
+ <para>
+ More elaborate documentation may wish to add one or more of the
+ pandoc filters used to build the remainder of the manual, for
+ example the GNOME desktop uses
+ </para>
+ <programlisting>
+$ pandoc gnome.md -t docbook --top-level-division=chapter \
+ --extract-media=media -f markdown+smart \
+ --lua-filter ../../../../../doc/build-aux/pandoc-filters/myst-reader/roles.lua \
+ --lua-filter ../../../../../doc/build-aux/pandoc-filters/docbook-writer/rst-roles.lua \
+ &gt; gnome.xml
+</programlisting>
</listitem>
<listitem>
<para>
diff --git a/nixos/doc/manual/md-to-db.sh b/nixos/doc/manual/md-to-db.sh
index 4698e94f508b..a7421bed532e 100755
--- a/nixos/doc/manual/md-to-db.sh
+++ b/