···1+# WeeChat {#module-services-weechat}
2+3+[WeeChat](https://weechat.org/) is a fast and
4+extensible IRC client.
5+6+## Basic Usage {#module-services-weechat-basic-usage}
7+8+By default, the module creates a
9+[`systemd`](https://www.freedesktop.org/wiki/Software/systemd/)
10+unit which runs the chat client in a detached
11+[`screen`](https://www.gnu.org/software/screen/)
12+session.
13+14+This can be done by enabling the `weechat` service:
15+```
16+{ ... }:
17+18+{
19+ services.weechat.enable = true;
20+}
21+```
22+23+The service is managed by a dedicated user named `weechat`
24+in the state directory `/var/lib/weechat`.
25+26+## Re-attaching to WeeChat {#module-services-weechat-reattach}
27+28+WeeChat runs in a screen session owned by a dedicated user. To explicitly
29+allow your another user to attach to this session, the
30+`screenrc` needs to be tweaked by adding
31+[multiuser](https://www.gnu.org/software/screen/manual/html_node/Multiuser.html#Multiuser)
32+support:
33+```
34+{
35+ programs.screen.screenrc = ''
36+ multiuser on
37+ acladd normal_user
38+ '';
39+}
40+```
41+Now, the session can be re-attached like this:
42+```
43+screen -x weechat/weechat-screen
44+```
45+46+*The session name can be changed using [services.weechat.sessionName.](options.html#opt-services.weechat.sessionName)*
···59 };
60 };
6162+ # Don't edit the docbook xml directly, edit the md and generate it:
63+ # `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`
64 meta.doc = ./weechat.xml;
65}
+43-48
nixos/modules/services/misc/weechat.xml
···1-<chapter xmlns="http://docbook.org/ns/docbook"
2- xmlns:xlink="http://www.w3.org/1999/xlink"
3- xmlns:xi="http://www.w3.org/2001/XInclude"
4- version="5.0"
5- xml:id="module-services-weechat">
6- <title>WeeChat</title>
7- <para>
8- <link xlink:href="https://weechat.org/">WeeChat</link> is a fast and
9- extensible IRC client.
10- </para>
11- <section xml:id="module-services-weechat-basic-usage">
12- <title>Basic Usage</title>
13-14 <para>
15- By default, the module creates a
16- <link xlink:href="https://www.freedesktop.org/wiki/Software/systemd/"><literal>systemd</literal></link>
17- unit which runs the chat client in a detached
18- <link xlink:href="https://www.gnu.org/software/screen/"><literal>screen</literal></link>
19- session.
20 </para>
21-22- <para>
23- This can be done by enabling the <literal>weechat</literal> service:
24-<programlisting>
000000000025{ ... }:
2627{
28 services.weechat.enable = true;
29}
30</programlisting>
31- </para>
32-33- <para>
34- The service is managed by a dedicated user named <literal>weechat</literal>
35- in the state directory <literal>/var/lib/weechat</literal>.
36- </para>
37- </section>
38- <section xml:id="module-services-weechat-reattach">
39- <title>Re-attaching to WeeChat</title>
40-41- <para>
42- WeeChat runs in a screen session owned by a dedicated user. To explicitly
43- allow your another user to attach to this session, the
44- <literal>screenrc</literal> needs to be tweaked by adding
45- <link xlink:href="https://www.gnu.org/software/screen/manual/html_node/Multiuser.html#Multiuser">multiuser</link>
46- support:
47-<programlisting>
48{
49 programs.screen.screenrc = ''
50 multiuser on
···52 '';
53}
54</programlisting>
55- Now, the session can be re-attached like this:
56-<programlisting>
0057screen -x weechat/weechat-screen
58</programlisting>
59- </para>
60-61- <para>
62- <emphasis>The session name can be changed using
63- <link linkend="opt-services.weechat.sessionName">services.weechat.sessionName.</link></emphasis>
64- </para>
65- </section>
66</chapter>
···1+<chapter xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="module-services-weechat">
2+ <title>WeeChat</title>
000000000003 <para>
4+ <link xlink:href="https://weechat.org/">WeeChat</link> is a fast and
5+ extensible IRC client.
0006 </para>
7+ <section xml:id="module-services-weechat-basic-usage">
8+ <title>Basic Usage</title>
9+ <para>
10+ By default, the module creates a
11+ <link xlink:href="https://www.freedesktop.org/wiki/Software/systemd/"><literal>systemd</literal></link>
12+ unit which runs the chat client in a detached
13+ <link xlink:href="https://www.gnu.org/software/screen/"><literal>screen</literal></link>
14+ session.
15+ </para>
16+ <para>
17+ This can be done by enabling the <literal>weechat</literal>
18+ service:
19+ </para>
20+ <programlisting>
21{ ... }:
2223{
24 services.weechat.enable = true;
25}
26</programlisting>
27+ <para>
28+ The service is managed by a dedicated user named
29+ <literal>weechat</literal> in the state directory
30+ <literal>/var/lib/weechat</literal>.
31+ </para>
32+ </section>
33+ <section xml:id="module-services-weechat-reattach">
34+ <title>Re-attaching to WeeChat</title>
35+ <para>
36+ WeeChat runs in a screen session owned by a dedicated user. To
37+ explicitly allow your another user to attach to this session, the
38+ <literal>screenrc</literal> needs to be tweaked by adding
39+ <link xlink:href="https://www.gnu.org/software/screen/manual/html_node/Multiuser.html#Multiuser">multiuser</link>
40+ support:
41+ </para>
42+ <programlisting>
043{
44 programs.screen.screenrc = ''
45 multiuser on
···47 '';
48}
49</programlisting>
50+ <para>
51+ Now, the session can be re-attached like this:
52+ </para>
53+ <programlisting>
54screen -x weechat/weechat-screen
55</programlisting>
56+ <para>
57+ <emphasis>The session name can be changed using
58+ <link xlink:href="options.html#opt-services.weechat.sessionName">services.weechat.sessionName.</link></emphasis>
59+ </para>
60+ </section>
0061</chapter>