Commit Graph

153 Commits

Author SHA1 Message Date
pennae
078707524e nixos/mjolnir: convert manual chapter to MD 2023-01-10 10:31:56 +01:00
pennae
14cc405a69 nixos/manual: inline callout lists
we only have three uses at the moment, all of them in code blocks where
they could just as well (or maybe better) be comments. markdown can't do
callouts without another pandoc filter, so we'll turn them into comments
instead.

synapse would've benefited from inline links, but referencing an
external numbered list as plain text (instead of clickable links, like
callout lists had) seems even worse than putting urls into comments as
plain text.
2023-01-10 10:31:54 +01:00
pennae
25ec23b9aa nixos/manual: strip un-MD-able tags
productname, application, acronym, guilabel, and guibutton were so far
not rendered specially and can go away completely.

replaceable does render differently, but since it was only used twice
and in places where the intent should be clear without the extra markup
it can go as well.
2023-01-10 10:31:53 +01:00
pennae
22144ba269 nixos/manual: normalize <package> -> <literal>
markdown can only do <literal>, so normalize to that. without
auto-linking to a package index the distinction is not very useful anyway.
2023-01-10 10:31:52 +01:00
pennae
d60f02b753 nixos/manual: normalize <code> -> <literal>
markdown can only translate to <literal>, so normalize to that or to
other more appropriate tags.
2023-01-10 10:31:52 +01:00
pennae
0715ecf936 nixos/manual: normalize <programlisting>
makes sure that program listing tags are separated from their contents
by exactly a newline character. this makes the markdown translation
easier to verify (since no new newlines need to be inserted), and
there's no rendering difference anyway.
2023-01-10 10:31:52 +01:00
pennae
80a78f2e1e nixos/manual: remove links from program listings
markdown cannot represent those links. remove them all now instead of in
each chapter conversion to keep the diff for each chapter small and more
understandable.
2023-01-10 10:31:52 +01:00
Robert Hensing
f03c7fb8d4 nixos/version: Only warn about unset stateVersion if used
If a configuration does not use services that depend on the
stateVersion, it does not need to be set.

This provides an incentive for services not to rely on
stateVersion, and not to burden users with this.
2022-12-28 14:35:14 +01:00
figsoda
6bb0dbf91f nixos: fix typos 2022-12-17 19:31:14 -05:00
Naïm Favier
0ff3b35356 nixos/doc: fix some options 2022-12-08 17:52:52 +01:00
pacien
4cdc08f925 nixos/mautrix-telegram: document JSON env var config
This was introduced in mautrix-telegram v0.12.1.

See: https://github.com/mautrix/telegram/issues/584#issuecomment-1250027272
See: https://github.com/mautrix/telegram/releases/tag/v0.12.1
2022-11-21 08:46:52 -05:00
pacien
e14bdbb997 Revert "nixos/mautrix-telegram: substitute secrets in config file at runtime (#112966)"
This is no longer necessary since mautrix-telegram v0.12.1, which
supports JSON-formatted environment variable and therefore maps
natively.

See: https://github.com/mautrix/telegram/issues/584#issuecomment-1250027272
See: https://github.com/mautrix/telegram/releases/tag/v0.12.1

This partially reverts commit 24133ead28.
2022-11-21 08:46:52 -05:00
CRTified
4a8f6ceb66 nixos/mautrix-telegram: add documentation for setting arbitrary secrets
The change that allows setting the secrets by an environment file had
the undocumented side effect of allowing to set any key by the environment
file (Related PR: https://github.com/tulir/mautrix-telegram/pull/332).

This is required to e.g. set `bridge.login_shared_secret`, which was not
documented before.

GitHub: closes #103347
2022-11-21 08:46:52 -05:00
Gauvain 'GovanifY' Roussel-Tarbouriech
5a4a53dbc6 nixos/mautrix-telegram: fix crash on postgresql database usage 2022-11-10 11:17:20 -05:00
Winter
4abe8dcd61 nixos/mautrix-telegram: fix link to example config 2022-10-30 13:20:16 -04:00
Winter
8e803f4364 nixos/mautrix-telegram: add new required config option 2022-10-30 13:20:16 -04:00
Kevin Cox
610fcf1243 nixos/mautrix-facebook: add new required config option 2022-10-29 20:59:36 -04:00
Yorick van Pelt
af4a43e36a
treewide: convert fake octal ints to strings
These were being cast to strings later and then reinterpreted as
octal.
2022-10-28 17:23:44 +02:00
Franc[e]sco
7cee18eef3 services.dendrite: change ExecStartPre to a list 2022-10-27 15:21:13 +02:00
Winter
7414171dd1 dendrite: 0.9.9 -> 0.10.1 2022-09-30 16:56:57 -04:00
Lorenzo Manacorda
241f31a0a7 nixos/matrix-synapse: fix link to install instructions 2022-09-18 04:14:57 +02:00
pennae
f2ea09ecbe nixos/*: convert options with listings
minor rendering changes.
2022-08-31 17:27:36 +02:00
pennae
ef176dcf7e nixos/*: automatically convert option descriptions
conversions were done using https://github.com/pennae/nix-doc-munge
using (probably) rev f34e145 running

    nix-doc-munge nixos/**/*.nix
    nix-doc-munge --import nixos/**/*.nix

the tool ensures that only changes that could affect the generated
manual *but don't* are committed, other changes require manual review
and are discarded.
2022-08-31 16:32:53 +02:00
Yaya
0c5fbf9c08 nixos/matrix-synapse: Harden systemd serivce
This commit introduces hardening options to the `matrix-synapse`
systemd service.
2022-08-25 08:58:22 +00:00
Kevin Cox
9e0494b3d1 nixos/mautrix-facebook: set verification levels
These are now required otherwise startup fails with:

> TypeError: 'NoneType' object is not subscriptable

The chosen levels are stricter than default but don't require unsupported signing or DB editing so seem like a reasonable high bar for now. It is easy for users to lower the levels so it is better to be stricter by default.

Default levels: 0ce0588725/mautrix_facebook/example-config.yaml (L247-L263)
2022-08-21 14:50:38 -04:00
Kevin Cox
3a08b9acab nixos/mautrix-facebook: create group
Otherwise we get a warning when applying the config.
2022-08-21 14:50:38 -04:00
pennae
6039648c50 nixos/*: automatically convert option docs 2022-08-19 22:40:58 +02:00
pennae
7e7d68a250 nixos/*: mark pre-existing markdown descriptions as mdDoc 2022-08-19 22:40:58 +02:00
pennae
e4ed177f82 nixos/* eliminate inner whitespace in tags that was missed earlier
nix-doc-munge won't match tags that contain newlines anywhere. most of
these have already been removed, but a few obviously made it through.
2022-08-19 22:40:58 +02:00
pennae
087472b1e5 nixos/*: automatically convert option docs 2022-08-06 20:39:12 +02:00
pennae
423545fe48 nixos/*: normalize manpage references to single-line form
now nix-doc-munge will not introduce whitespace changes when it replaces
manpage references with the MD equivalent.

no change to the manpage, changes to the HTML manual are whitespace only.
2022-08-05 18:34:50 +02:00
pennae
61e93df189 nixos/*: automatically convert option docs to MD
once again using nix-doc-munge (69d080323a)
2022-08-03 22:46:41 +02:00
pennae
3aebb4a2be nixos/*: normalize link format
make (almost) all links appear on only a single line, with no
unnecessary whitespace, using double quotes for attributes. this lets us
automatically convert them to markdown easily.

the few remaining links are extremely long link in a gnome module, we'll
come back to those at a later date.
2022-08-03 21:57:46 +02:00
pennae
694d5b19d3 nixos/*: replace </para><para> with double linebreaks
our xslt already replaces double line breaks with a paragraph close and
reopen. not using explicit para tags lets nix-doc-munge convert more
descriptions losslessly.

only whitespace changes to generated documents, except for two
strongswan options gaining paragraph two breaks they arguably should've
had anyway.
2022-08-03 20:39:21 +02:00
pennae
2e751c0772 treewide: automatically md-convert option descriptions
the conversion procedure is simple:

 - find all things that look like options, ie calls to either `mkOption`
   or `lib.mkOption` that take an attrset. remember the attrset as the
   option
 - for all options, find a `description` attribute who's value is not a
   call to `mdDoc` or `lib.mdDoc`
 - textually convert the entire value of the attribute to MD with a few
   simple regexes (the set from mdize-module.sh)
 - if the change produced a change in the manual output, discard
 - if the change kept the manual unchanged, add some text to the
   description to make sure we've actually found an option. if the
   manual changes this time, keep the converted description

this procedure converts 80% of nixos options to markdown. around 2000
options remain to be inspected, but most of those fail the "does not
change the manual output check": currently the MD conversion process
does not faithfully convert docbook tags like <code> and <package>, so
any option using such tags will not be converted at all.
2022-07-30 15:16:34 +02:00
Nick Cao
f1a08f54f0
nixos/mautrix-telegram: add lottieconverter to path 2022-07-23 16:43:39 +08:00
Maximilian Bosch
4f2a86a43a
Merge pull request #178858 from Ma27/matrix-docs
nixos/matrix-synapse: update docs
2022-07-04 16:56:27 +02:00
Maximilian Bosch
899a37d190
nixos/matrix-synapse: update docs
* Update attribute names in code examples (* -> settings.*).
* Use `nix-shell -p` rather than `nix run` because the example won't
  work with the current default Nix.
* Update config values for `element-web`.
* Fix link to `element-web` security considerations.
* Make the synapse expression even smaller and use callout-lists to
  explain the code.
* Document how to correctly deploy the shared registration secret.

[1] https://spec.matrix.org/latest/client-server-api/#getwell-knownmatrixclient
2022-07-04 12:13:57 +02:00
Martin Weinelt
6c1f44b3f1
nixos/matrix-appservice-irc: wait for postgres to start
Closes: #178692
2022-06-24 08:37:43 +02:00
pennae
320aa2a791 treewide: attempt at markdown option docs 2022-06-12 12:44:38 +02:00
Nguyễn Gia Phong
22f3d4e4db
nixos: move matrix services into their category 2022-06-06 13:50:58 +09:00
Janne Heß
4c5e7bde3e
nixos/matrix-synapse: Add a defaultText 2022-05-05 12:22:37 +02:00
Luflosi
17a406f28a
nixos/matrix-synapse: fix typo in mkRemovedOptionModule replacementInstructions
The correct capitalisation is lower-case here.
2022-04-15 22:52:29 +02:00
Martin Weinelt
3344cea254
Merge pull request #164627 from mkg20001/fix-matrix 2022-03-31 18:26:03 +02:00
Maciej Krüger
0340236668
nixos/matrix-synapse: Fix configFile type
This is now a derivation as pkg.formats is used,
therefore this should be of type path
2022-03-17 19:53:30 +01:00
Pierre Bourdon
9fad223ad1
matrix-synapse: fix release notes and doc for #158605 changes 2022-03-12 21:58:26 +01:00
Martin Weinelt
f799a02bca
nixos/synapse: move into matrix category 2022-03-04 23:57:35 +01:00
Johannes Schleifenbaum
ff9aa77c1f
matrix-synapse-plugins.matrix-synapse-mjolnir-antispam: 1.2.1 -> 1.3.1 2022-02-10 10:50:41 +01:00
Johannes Schleifenbaum
62cec07035
nixos/mjolnir: set rawHomeserverUrl in config 2021-11-16 19:21:33 +01:00
Graham Christensen
87ef832e49 nixos: mjolnir: literalExample -> literalExpression 2021-11-12 21:06:17 -05:00
Johannes Schleifenbaum
432ce1be8f
nixos/mjolnir: add documentation 2021-09-21 09:23:45 +02:00
Johannes Schleifenbaum
a4c4060efb
nixos/mjolnir: init 2021-09-21 09:22:52 +02:00
Johannes Schleifenbaum
b8448def21
nixos/pantalaimon: init 2021-09-21 09:21:19 +02:00