about summary refs log tree commit diff
path: root/nixpkgs/nixos/modules/services/misc/weechat.md
blob: fb20ebe1e4db22b6678f56c7707f4266de106808 (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
# WeeChat {#module-services-weechat}

[WeeChat](https://weechat.org/) is a fast and
extensible IRC client.

## Basic Usage {#module-services-weechat-basic-usage}

By default, the module creates a
[`systemd`](https://www.freedesktop.org/wiki/Software/systemd/)
unit which runs the chat client in a detached
[`screen`](https://www.gnu.org/software/screen/)
session.

This can be done by enabling the `weechat` service:
```nix
{ ... }:

{
  services.weechat.enable = true;
}
```

The service is managed by a dedicated user named `weechat`
in the state directory `/var/lib/weechat`.

## Re-attaching to WeeChat {#module-services-weechat-reattach}

WeeChat runs in a screen session owned by a dedicated user. To explicitly
allow your another user to attach to this session, the
`screenrc` needs to be tweaked by adding
[multiuser](https://www.gnu.org/software/screen/manual/html_node/Multiuser.html#Multiuser)
support:
```nix
{
  programs.screen.screenrc = ''
    multiuser on
    acladd normal_user
  '';
}
```
Now, the session can be re-attached like this:
```
screen -x weechat/weechat-screen
```

*The session name can be changed using [services.weechat.sessionName.](options.html#opt-services.weechat.sessionName)*