···11+# WeeChat {#module-services-weechat}
22+33+[WeeChat](https://weechat.org/) is a fast and
44+extensible IRC client.
55+66+## Basic Usage {#module-services-weechat-basic-usage}
77+88+By default, the module creates a
99+[`systemd`](https://www.freedesktop.org/wiki/Software/systemd/)
1010+unit which runs the chat client in a detached
1111+[`screen`](https://www.gnu.org/software/screen/)
1212+session.
1313+1414+This can be done by enabling the `weechat` service:
1515+```
1616+{ ... }:
1717+1818+{
1919+ services.weechat.enable = true;
2020+}
2121+```
2222+2323+The service is managed by a dedicated user named `weechat`
2424+in the state directory `/var/lib/weechat`.
2525+2626+## Re-attaching to WeeChat {#module-services-weechat-reattach}
2727+2828+WeeChat runs in a screen session owned by a dedicated user. To explicitly
2929+allow your another user to attach to this session, the
3030+`screenrc` needs to be tweaked by adding
3131+[multiuser](https://www.gnu.org/software/screen/manual/html_node/Multiuser.html#Multiuser)
3232+support:
3333+```
3434+{
3535+ programs.screen.screenrc = ''
3636+ multiuser on
3737+ acladd normal_user
3838+ '';
3939+}
4040+```
4141+Now, the session can be re-attached like this:
4242+```
4343+screen -x weechat/weechat-screen
4444+```
4545+4646+*The session name can be changed using [services.weechat.sessionName.](options.html#opt-services.weechat.sessionName)*
+2
nixos/modules/services/misc/weechat.nix
···5959 };
6060 };
61616262+ # Don't edit the docbook xml directly, edit the md and generate it:
6363+ # `pandoc weechat.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 > weechat.xml`
6264 meta.doc = ./weechat.xml;
6365}
+43-48
nixos/modules/services/misc/weechat.xml
···11-<chapter xmlns="http://docbook.org/ns/docbook"
22- xmlns:xlink="http://www.w3.org/1999/xlink"
33- xmlns:xi="http://www.w3.org/2001/XInclude"
44- version="5.0"
55- xml:id="module-services-weechat">
66- <title>WeeChat</title>
77- <para>
88- <link xlink:href="https://weechat.org/">WeeChat</link> is a fast and
99- extensible IRC client.
1010- </para>
1111- <section xml:id="module-services-weechat-basic-usage">
1212- <title>Basic Usage</title>
1313-11+<chapter xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="module-services-weechat">
22+ <title>WeeChat</title>
143 <para>
1515- By default, the module creates a
1616- <link xlink:href="https://www.freedesktop.org/wiki/Software/systemd/"><literal>systemd</literal></link>
1717- unit which runs the chat client in a detached
1818- <link xlink:href="https://www.gnu.org/software/screen/"><literal>screen</literal></link>
1919- session.
44+ <link xlink:href="https://weechat.org/">WeeChat</link> is a fast and
55+ extensible IRC client.
206 </para>
2121-2222- <para>
2323- This can be done by enabling the <literal>weechat</literal> service:
2424-<programlisting>
77+ <section xml:id="module-services-weechat-basic-usage">
88+ <title>Basic Usage</title>
99+ <para>
1010+ By default, the module creates a
1111+ <link xlink:href="https://www.freedesktop.org/wiki/Software/systemd/"><literal>systemd</literal></link>
1212+ unit which runs the chat client in a detached
1313+ <link xlink:href="https://www.gnu.org/software/screen/"><literal>screen</literal></link>
1414+ session.
1515+ </para>
1616+ <para>
1717+ This can be done by enabling the <literal>weechat</literal>
1818+ service:
1919+ </para>
2020+ <programlisting>
2521{ ... }:
26222723{
2824 services.weechat.enable = true;
2925}
3026</programlisting>
3131- </para>
3232-3333- <para>
3434- The service is managed by a dedicated user named <literal>weechat</literal>
3535- in the state directory <literal>/var/lib/weechat</literal>.
3636- </para>
3737- </section>
3838- <section xml:id="module-services-weechat-reattach">
3939- <title>Re-attaching to WeeChat</title>
4040-4141- <para>
4242- WeeChat runs in a screen session owned by a dedicated user. To explicitly
4343- allow your another user to attach to this session, the
4444- <literal>screenrc</literal> needs to be tweaked by adding
4545- <link xlink:href="https://www.gnu.org/software/screen/manual/html_node/Multiuser.html#Multiuser">multiuser</link>
4646- support:
4747-<programlisting>
2727+ <para>
2828+ The service is managed by a dedicated user named
2929+ <literal>weechat</literal> in the state directory
3030+ <literal>/var/lib/weechat</literal>.
3131+ </para>
3232+ </section>
3333+ <section xml:id="module-services-weechat-reattach">
3434+ <title>Re-attaching to WeeChat</title>
3535+ <para>
3636+ WeeChat runs in a screen session owned by a dedicated user. To
3737+ explicitly allow your another user to attach to this session, the
3838+ <literal>screenrc</literal> needs to be tweaked by adding
3939+ <link xlink:href="https://www.gnu.org/software/screen/manual/html_node/Multiuser.html#Multiuser">multiuser</link>
4040+ support:
4141+ </para>
4242+ <programlisting>
4843{
4944 programs.screen.screenrc = ''
5045 multiuser on
···5247 '';
5348}
5449</programlisting>
5555- Now, the session can be re-attached like this:
5656-<programlisting>
5050+ <para>
5151+ Now, the session can be re-attached like this:
5252+ </para>
5353+ <programlisting>
5754screen -x weechat/weechat-screen
5855</programlisting>
5959- </para>
6060-6161- <para>
6262- <emphasis>The session name can be changed using
6363- <link linkend="opt-services.weechat.sessionName">services.weechat.sessionName.</link></emphasis>
6464- </para>
6565- </section>
5656+ <para>
5757+ <emphasis>The session name can be changed using
5858+ <link xlink:href="options.html#opt-services.weechat.sessionName">services.weechat.sessionName.</link></emphasis>
5959+ </para>
6060+ </section>
6661</chapter>