Commit Graph

194 Commits

Author SHA1 Message Date
Maximilian Bosch
1ab411fcd4
Merge pull request #247386 from montchr/docs-matrix-synapse
nixos/matrix-synapse: set public baseurl in example config
2023-08-10 12:52:34 +02:00
Frédéric Christ
3a1f5757b9 mautrix-whatsapp: move defaults back to options.
As suggested by @nickcao this commit moves the defaults back to the
options. Only `homeserver.domain` stays in the config section since the
documentation module does not support referencing attributes of other
modules.
2023-08-06 11:03:17 +02:00
Chris Montgomery
aefa0bb6cc
nixos/matrix-synapse: set public baseurl in example config 2023-08-05 16:08:35 -04:00
Frédéric Christ
288d2ee55d mautrix-whatsapp: Move defaults to config section
This contribution applies Example 32 (conventional settings option) from
[nixpkgs](https://nixos.org/manual/nixos/stable/#sec-settings-nix-representable).
2023-08-05 13:57:15 +02:00
Frédéric Christ
0173330426 mautrix-whatsapp: Add postgres options to example 2023-08-02 21:32:55 +02:00
Frédéric Christ
b443a4d940 mautrix-whatsapp: Apply suggestions
This contribution applies suggestions made by Luflosi in
https://github.com/NixOS/nixpkgs/pull/176025#issuecomment-1237338551
as well as some general refactoring.

Co-authored-by: Luflosi <Luflosi@users.noreply.github.com>
2023-08-02 21:06:41 +02:00
Victor SENE
641d717ace nixos/mautrix-whatsapp: init module
Import from PR https://github.com/NixOS/nixpkgs/pull/176025

Co-authored-by: Luflosi <Luflosi@users.noreply.github.com>
2023-08-02 21:06:41 +02:00
Maximilian Bosch
d2facca5c0
nixos/matrix-synapse: fix option description of extras option
Co-authored-by: Benjamin Saunders <ben.e.saunders@gmail.com>
2023-08-01 18:16:56 +02:00
Maximilian Bosch
701d0e1da6
nixos/matrix-synapse: fix path to extras for additive settings 2023-07-31 19:15:09 +02:00
Maximilian Bosch
190886c5cc
nixos/matrix-synapse: clarify that extras are additive 2023-07-31 18:54:17 +02:00
Maximilian Bosch
5a3870c212
nixos/matrix-synapse: expose final matrix-synapse package via package-option
When extending this module, it might be necessary to run something
from the package that's used in `matrix-synapse.service` (e.g. for
workers).

Now this can be trivially done by using
`config.services.matrix-synapse.package`. Previously it was necessary to
reuse the `PYTHONPATH` from the environment of `matrix-synapse.service`,
but that one doesn't exist anymore.
2023-07-31 18:20:28 +02:00
Дамјан Георгиевски
69bc2ad72f matrix-appservice-irc: 0.38.0 -> 1.0.1
https://github.com/matrix-org/matrix-appservice-irc/releases/tag/1.0.0

* This release drops support for Node 16. The minimum required version is now 18+.
* Moved from NPM to Yarn

https://github.com/matrix-org/matrix-appservice-irc/releases/tag/1.0.1

* Fixes for GHSA-vc7j-h8xg-fv5x.
* Fixes for GHSA-3pmj-jqqp-2mj3.
* Fixes for GHSA-c7hh-3v6c-fj4q
* Update matrix-appservice-bridge to 9.0.1

while there was an effort to make this package with `mkYarnPackage`, in the end it
was suggested to just use `stdenv.mkDerivation` instead

nixos/matrix-appservice-irc:
* fix path to config.schema.yml directory stucture of the package changed
* use remarshal instead of python and pyyaml
  to convert the config schema from yaml to json
2023-07-31 11:19:42 +02:00
Martin Weinelt
6ae8e13396
nixos/matrix-appservice-irc: update syscall filter
Simplify the SystemcallFilter by employing an explicit allow list, and
an explicit block list.

Node since version 18 requires syscalls in the @pkey group.

Excluding @privileged and @resources is a recommendation in
systemd-analyze.
2023-07-30 03:07:52 +02:00
Benjamin Saunders
5f445e8cf5 nixos/matrix-synapse: fix duplicate Content-Type header in example
nginx adds a `content-type: application/octet-stream` header by
default, and `add_header` does not supplant it. By setting
`default_type` instead we avoid the extraneous header.
2023-07-29 17:12:09 -07:00
Martin Weinelt
18733782ad
nixos/conduit: improve state directory permissions
Allow only the conduit user to access its database files, and make sure
to create all new files with 0600 (o+rw).
2023-07-25 16:54:39 +02:00
Sandro Jäckel
18010665ca
nixos/matrix-sliding-sync: init
Co-authored-by: Emily <55066419+emilylange@users.noreply.github.com>
2023-07-19 23:59:25 +02:00
Martin Weinelt
1076c3ada6
nixos/matrix-synapse: Allow passing extras, discover extras from config
With this change we allow the user to configure extras, exposed as
optional-dependencies on the matrix-synapse package.

The vertical integration between package, user configuration and
deployment is a huge boon which then allows us to dynamically adapt the
python environment the service runs in, by inspecting the configuration
and autodiscovering certain used extras from config paths.
2023-07-18 17:53:27 +02:00
chayleaf
4d4c73ff78 treewide: update path to getent 2023-07-12 02:32:23 +07:00
Frédéric Tobias Christ
bb55edd515 mautrix-telegram: 0.14.0 -> 0.14.1
Add new configuration option regarding IPv6 support to the example.

Diff: https://github.com/mautrix/telegram/compare/refs/tags/v0.14.0...v0.14.1
Changelog: https://github.com/mautrix/telegram/releases/tag/v0.14.1
2023-07-02 17:44:51 +02:00
Nick Cao
cf58ff13a3
Merge pull request #234254 from kevincox/mautrix-facebook-appservice-id
nixos.mautrix-facebook: Fix appservice name
2023-05-26 19:48:00 -06:00
Kevin Cox
5242aea64f
nixos.mautrix-facebook: Fix appservice name
It appears that newer mautrix-facebook versions default to the appservice name `facebook`. This was breaking our registration and causing mautrix-facebook to fail to start. This changes the name back and makes the registration generated match whatever the setting in the app is.
2023-05-26 12:39:37 -04:00
IndeedNotJames
d212ec13b8
nixos/synapse: allow omitting trusted_key_servers[].verify_keys
Synapse does not require the `verify_keys` attr/object to be set.
It made sense back in the day, when federation traffic used to use self-signed certificates. But this is no longer the case.

The previous `types.nullOr` didn't actually allow omitting `verify_keys` because Synapse's config parser is unable to parse that.

Not a breaking change.

Upstream docs: https://matrix-org.github.io/synapse/latest/usage/configuration/config_documentation.html?highlight=verify_keys#trusted_key_servers
2023-05-19 15:46:53 +02:00
Nick Cao
c256ecf7a3
nixos/mjolnir: explicitly set --mjolnir-config 2023-05-15 18:40:57 +08:00
Jörg Thalheim
87083d40c0
Merge pull request #221856 from Mic92/dendrite
dendrite: 0.11.0 -> 0.12.0
2023-04-05 08:36:44 +01:00
K900
542012fe24
Merge pull request #222336 from motiejus/master_synapse_signing_key_path
matrix-synapse: fix signing key path in fix-permissions script
2023-03-29 16:57:56 +03:00
Sandro Jäckel
40c8cebade
nixos/synapse: Fix incorrect module path after it was moved
Fixes: 22f3d4e4db ("nixos: move matrix services into their category")
2023-03-27 00:49:38 +02:00
Motiejus Jakštys
f2b3bed847 matrix-synapse: fix signing key path in fix-permissions script
The preStart script will fail if the signing_key_path is nonstandard.
2023-03-21 13:21:24 +02:00
Maximilian Bosch
8c118951d5
nixos/doc: fix .well-known example for matrix-synapse
I'm using this config on my homeserver and while trying out alternative
Matrix clients I discovered (pun intended) that the auto-discovery of my
homeserver is broken. While investigating I found out that neither the
JS nor the Rust SDK (tested via element-web and fractal) are happy about
an empty `m.identity_server`-block. Removing this part fixed the problem
for me.
2023-03-19 17:38:32 +01:00
Jörg Thalheim
2c19718bee dendrite: 0.11.0 -> 0.12.0
Diff: https://github.com/matrix-org/dendrite/compare/v0.12.0...v0.12.0

Changelog: https://github.com/matrix-org/dendrite/releases/tag/v0.12.0
2023-03-18 15:35:47 +01:00
Sandro
2665f5e379
Merge pull request #178447 from Francesco149/dendrite-prestart 2023-03-03 18:45:09 +01:00
schnusch
bbc988ba00 nixos/matrix-synapse: fix .well-known delegation of federated traffic
Synapse is reverse-proxied on ${fqdn} not ${config.networking.domain} and
the .well-known delegation info must point to the domain on which synapse
is hosted, see https://matrix-org.github.io/synapse/latest/delegate.html
2023-02-27 02:02:35 +01:00
Luflosi
e5ffc94ea9
nixos/mautrix-facebook: fix copy&paste error
Closes https://github.com/NixOS/nixpkgs/issues/166312.
2023-02-22 00:03:19 +01:00
Nick Cao
2cf8e2f7ad
nixos/mautrix-telegram: add ffmpeg-full to path
Used for converting tgs to webm and webp format, as well as generating
video thumbnails. Using ffmpeg-full for webp support.
2023-02-18 15:40:55 +08:00
Nick Cao
48d6418a2e
Merge pull request #215696 from fee1-dead-contrib/matrix-appservice-discord.customize-package
nixos/appservice-discord: customizable `package`
2023-02-13 09:50:52 +08:00
Deadbeef
e391cf368a nixos/appservice-discord: customizable package 2023-02-11 01:08:46 +08:00
pennae
0a6e6cf7e6 nixos/manual: render module chapters with nixos-render-docs
this converts meta.doc into an md pointer, not an xml pointer. since we
no longer need xml for manual chapters we can also remove support for
manual chapters from md-to-db.sh

since pandoc converts smart quotes to docbook quote elements and our
nixos-render-docs does not we lose this distinction in the rendered
output. that's probably not that bad, our stylesheet didn't make use of
this anyway (and pre-23.05 versions of the chapters didn't use quote
elements either).

also updates the nixpkgs manual to clarify that option docs support all
extensions (although it doesn't support headings at all, so heading
anchors don't work by extension).
2023-01-27 20:07:34 +01:00
colin
87c877fff8 nixos/mx-puppet-discord: move into matrix category 2023-01-16 06:23:25 +00:00
pennae
53fc887582 nixos/manual: move "edit the MD file" comments to generated XML 2023-01-10 12:34:37 +01:00
pennae
bf92eaebe4 nixos/manual: generate module chapters with md-to-db.sh 2023-01-10 10:32:00 +01:00
pennae
23ea73b416 nixos/manual: enable smart quotes for all MD chapters 2023-01-10 10:31:59 +01:00
pennae
ad540ad4a5 nixos/synapse: convert manual chapter to MD 2023-01-10 10:31:56 +01:00
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