1# WeeChat {#module-services-weechat}
2
3[WeeChat](https://weechat.org/) is a fast and
4extensible IRC client.
5
6## Basic Usage {#module-services-weechat-basic-usage}
7
8By default, the module creates a
9[`systemd`](https://www.freedesktop.org/wiki/Software/systemd/)
10unit which runs the chat client in a detached
11[`screen`](https://www.gnu.org/software/screen/)
12session.
13
14This can be done by enabling the `weechat` service:
15```nix
16{ ... }:
17
18{
19 services.weechat.enable = true;
20}
21```
22
23The service is managed by a dedicated user named `weechat`
24in the state directory `/var/lib/weechat`.
25
26## Re-attaching to WeeChat {#module-services-weechat-reattach}
27
28WeeChat runs in a screen session owned by a dedicated user. To explicitly
29allow 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)
32support:
33```nix
34{
35 programs.screen.screenrc = ''
36 multiuser on
37 acladd normal_user
38 '';
39}
40```
41Now, the session can be re-attached like this:
42```
43screen -x weechat/weechat-screen
44```
45
46*The session name can be changed using [services.weechat.sessionName.](options.html#opt-services.weechat.sessionName)*