summary refs log tree commit diff
path: root/nixos/modules/services/misc/weechat.xml
blob: 83ae171217d249fee72113ecb976ea2b9f391a13 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<!-- Do not edit this file directly, edit its companion .md instead
     and regenerate this file using nixos/doc/manual/md-to-db.sh -->
<chapter xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="module-services-weechat">
  <title>WeeChat</title>
  <para>
    <link xlink:href="https://weechat.org/">WeeChat</link> is a fast and
    extensible IRC client.
  </para>
  <section xml:id="module-services-weechat-basic-usage">
    <title>Basic Usage</title>
    <para>
      By default, the module creates a
      <link xlink:href="https://www.freedesktop.org/wiki/Software/systemd/"><literal>systemd</literal></link>
      unit which runs the chat client in a detached
      <link xlink:href="https://www.gnu.org/software/screen/"><literal>screen</literal></link>
      session.
    </para>
    <para>
      This can be done by enabling the <literal>weechat</literal>
      service:
    </para>
    <programlisting>
{ ... }:

{
  services.weechat.enable = true;
}
</programlisting>
    <para>
      The service is managed by a dedicated user named
      <literal>weechat</literal> in the state directory
      <literal>/var/lib/weechat</literal>.
    </para>
  </section>
  <section xml:id="module-services-weechat-reattach">
    <title>Re-attaching to WeeChat</title>
    <para>
      WeeChat runs in a screen session owned by a dedicated user. To
      explicitly allow your another user to attach to this session, the
      <literal>screenrc</literal> needs to be tweaked by adding
      <link xlink:href="https://www.gnu.org/software/screen/manual/html_node/Multiuser.html#Multiuser">multiuser</link>
      support:
    </para>
    <programlisting>
{
  programs.screen.screenrc = ''
    multiuser on
    acladd normal_user
  '';
}
</programlisting>
    <para>
      Now, the session can be re-attached like this:
    </para>
    <programlisting>
screen -x weechat/weechat-screen
</programlisting>
    <para>
      <emphasis>The session name can be changed using
      <link xlink:href="options.html#opt-services.weechat.sessionName">services.weechat.sessionName.</link></emphasis>
    </para>
  </section>
</chapter>