Commit graph

45 commits

Author SHA1 Message Date
Felix Buehler 933a41a73f treewide: use optional instead of 'then []' 2023-06-25 09:11:40 -03: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
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 963c6f54aa nixos/prosody: convert manual chapter to MD 2023-01-10 10:31:57 +01:00
figsoda 6bb0dbf91f nixos: fix typos 2022-12-17 19:31:14 -05:00
figsoda dfff1a2b83 nixos/prosody: simplify logic 2022-11-30 17:36:07 -05:00
pennae 722b99bc0e nixos/*: convert options with admonitions to MD
rendering changes only slightly, most changes are in spacing.
2022-08-31 16:36:16 +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
Aaron Andersen 078a53824e nixos/prosody: provide additional details in the user and group options description 2022-06-18 10:08:08 -04:00
Aaron Andersen 79bfd3c0d0 nixos/prosody: conditionally provision required directories with StateDirectory 2022-06-18 10:05:15 -04:00
Félix Baylac-Jacqué 20693a1e73
prosody: 0.11.13 -> 0.12.0
See https://blog.prosody.im/prosody-0.12.0-released for more
informations.

We remove the various lua wrappers introduced by
6799a91843 and
16d0b4a69f. It seems like we don't need
them anymore. I'm not brave enough to dig into the Lua machinery to
see what resolved that. Sorry, you'll have to trust me on that one.

We should probably think about the migration from http_upload to
http_file_share for the NixOS module. It's not trivial, we need to
make sure we don't break the already uploaded URLs.
2022-05-02 12:43:19 +02:00
Naïm Favier 2ddc335e6f
nixos/doc: clean up defaults and examples 2021-10-04 12:47:20 +02:00
Malte Brandy cebf9198f3
treewide: De-inline uses of lib.boolToString
This commit should not change eval results
2020-10-14 01:46:17 +02:00
rnhmjoj 20d491a317
treewide: completely remove types.loaOf 2020-09-02 00:42:50 +02:00
Jörg Thalheim ba930d8679
nixos/modules: remove trailing whitespace
This leads to ci failure otherwise if the file gets changed.
git-blame can ignore whitespace changes.
2020-08-07 14:45:39 +01:00
Martin Milata ce0c39be0b nixos/prosody: add MUC extraConfig, fix extraConfig order
Add extraConfig option for the muc submodule.

Also move the global extraConfig before all components and
virtualhosts, because the manual states:

    The configuration is divided into two parts. The first part is known as
    the "global" section. All settings here apply to the whole server, and
    are the default for all virtual hosts.

    The second half of the file is a series of VirtualHost and Component
    definitions. Settings under each VirtualHost or Component line apply
    only to that host.

Before, if at least one muc was defined, or uploadHttp enabled, the
global extraConfig would end up after "muc" or "http_upload" component
making it apply to that component only and not globally.
2020-05-04 00:10:33 +02:00
Félix Baylac-Jacqué f5b1e6bc21
nixos/prosody: add NixOS manual entry
We add a Prosody entry to the NixOS manual showing how to setup a
basic XEP-0423 compliant Prosody service. This example also showcase
how to generate the associated ACME certificates.

Note: The <programlisting> body might look poorly indented, but trust
me, it's necessary. If we try to increase their indentation level, the
HTML output will end up containing a lot of unecesseray heading spaces
breaking the formatting...
2020-05-01 19:57:33 +02:00
Félix Baylac-Jacqué 353a8b58e6
nixos/prosody: leverage systemd sandbox features to harden service
We are leveraging the systemd sandboxing features to prevent the
service accessing locations it shouldn't do. Most notably, we are here
preventing the prosody service from accessing /home and providing it
with a private /dev and /tmp.

Please consult man systemd.exec for further informations.
2020-04-30 20:40:00 +02:00
Félix Baylac-Jacqué 8aea528872
nixos/prosody: make defaults comply with XEP-0423
Setting up a XMPP chat server is a pretty deep rabbit whole to jump in
when you're not familiar with this whole universe. Your experience
with this environment will greatly depends on whether or not your
server implements the right set of XEPs.

To tackle this problem, the XMPP community came with the idea of
creating a meta-XEP in charge of listing the desirable XEPs to comply
with. This meta-XMP is issued every year under an new XEP number. The
2020 one being XEP-0423[1].

This prosody nixos module refactoring makes complying with XEP-0423
easier. All the necessary extensions are enabled by default. For some
extensions (MUC and HTTP_UPLOAD), we need some input from the user and
cannot provide a sensible default nixpkgs-wide. For those, we guide
the user using a couple of assertions explaining the remaining manual
steps to perform.

We took advantage of this substential refactoring to refresh the
associated nixos test.

Changelog:
- Update the prosody package to provide the necessary community
  modules in order to comply with XEP-0423. This is a tradeoff, as
  depending on their configuration, the user might end up not using them
  and wasting some disk space. That being said, adding those will
  allow the XEP-0423 users, which I expect to be the majority of
  users, to leverage a bit more the binary cache.
- Add a muc submodule populated with the prosody muc defaults.
- Add a http_upload submodule in charge of setting up a basic http
  server handling the user uploads. This submodule is in is
  spinning up an HTTP(s) server in charge of receiving and serving the
  user's attachments.
- Advertise both the MUCs and the http_upload endpoints using mod disco.
- Use the slixmpp library in place of the now defunct sleekxmpp for
  the prosody NixOS test.
- Update the nixos test to setup and test the MUC and http upload
  features.
- Add a couple of assertions triggered if the setup is not xep-0423
  compliant.

[1] https://xmpp.org/extensions/xep-0423.html
2020-04-30 20:39:54 +02:00
volth b384420f2c
nixos/prosody: fix escape 2019-09-17 00:20:05 +00:00
Silvan Mosberger 478e7184f8
nixos/modules: Remove all usages of types.string
And replace them with a more appropriate type

Also fix up some minor module problems along the way
2019-08-31 18:19:00 +02:00
Milan Pässler 387d85b271 nixos/prosody: add authentication option (fixes #53134)
Passwords should not be stored in plain text by default. On existing
installations the next time a users user accounts will automatically
be upgraded from plain to hashed one-by-one as they log in.
2019-05-24 23:51:44 +02:00
Milan Pässler 24d5e30b5f nixos/prosody: add ExecReload
Add an ExecReload command to the prosody service, to allow reloading
prosody by sending SIGHUP to the main process, for example to update
certificates without restarting the server. This is exactly how the
`prosodyctl` tool does it.

Note: Currently there is a bug which prevents mod_http from reloading the
certificates properly: https://issues.prosody.im/1216.
2019-01-26 03:12:09 +01:00
Satoshi Shishiku 5a93f6149a
prosody service: set cafile
Fix s2s_secure_auth.
2018-12-17 01:01:41 +01:00
Florian Klink fff5923686 nixos/modules: users.(extraUsers|extraGroup->users|group) 2018-06-30 03:02:58 +02:00
Márton Boros ec1419bad8 nixos/prosody: fix pidfile path 2018-04-13 11:38:52 +02:00
Márton Boros d260e95cb9 nixos/prosody: add user, group options 2018-04-13 11:38:29 +02:00
Márton Boros 615fefb3a5 nixos/prosody: add dataDir option 2018-04-09 14:19:42 +02:00
Robin Gloster 0a80f2c0f4
prosody: improve module handling 2018-03-22 03:40:46 +01:00
Florian Jacob 226965da67 prosody: 0.9.12 -> 0.10.0
updating config options, removing luazlib as mod_compression was removed
for security reasons.
2018-03-12 20:19:03 +01:00
Robert Schütz de74ffb8f8 nixos/prosody: add package option 2018-02-14 14:56:00 +01:00
Satoshi Shishiku c75528bd56 prosody service: add extra SSL options 2017-11-01 13:38:01 +01:00
Satoshi Shishiku 57f3dd5a2f prosody service: add restart trigger 2017-11-01 13:38:01 +01:00
Satoshi Shishiku 2e55e164eb prosody service: forking 2017-11-01 13:37:58 +01:00
Satoshi Shishiku 1e45a6459e prosody service: add types 2017-11-01 13:37:57 +01:00
Franz Pletz 3ab45f4b36
treewide: use boolToString function 2017-04-11 18:18:53 +02:00
Franz Pletz 4905c1c54f
prosody service: needs working network connectivity 2017-02-23 16:07:41 +01:00
Emery Hemingway b675619391 nixos: use types.lines for extraConfig 2016-10-23 19:41:43 +02:00
Eric Sagnes d89a718baf prosody module: optionSet -> submodule 2016-09-13 12:53:11 +09:00
Luca Bruno eac32cf697 Revert "Merge pull request #7032 from flosse/change-option-names"
This reverts commit c265aafb55, reversing
changes made to c9bbf2228f.

Breaks evaluation, see https://github.com/NixOS/nixpkgs/pull/7032#issuecomment-87641471
2015-03-30 13:45:07 +02:00
Markus Kohlhase 47aa6725e2 nixos: prosody service - rename virtualHosts option 'enabled' to 'enable' 2015-03-27 21:36:05 +00:00
Markus Kohlhase 5308d3284b prosody: added websocket support 2014-10-15 03:57:00 +02:00
Markus Kohlhase d86c2c30c5 prosody: packaged as a service
Conflicts:
	nixos/modules/misc/ids.nix
2014-10-11 18:53:43 +02:00