diff --git a/nixos/modules/services/misc/weechat.md b/nixos/modules/services/misc/weechat.md new file mode 100644 index 000000000000..21f41be5b4a0 --- /dev/null +++ b/nixos/modules/services/misc/weechat.md @@ -0,0 +1,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: +``` +{ ... }: + +{ + 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: +``` +{ + 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)* diff --git a/nixos/modules/services/misc/weechat.nix b/nixos/modules/services/misc/weechat.nix index 663a767a0c18..3fa408d9c88f 100644 --- a/nixos/modules/services/misc/weechat.nix +++ b/nixos/modules/services/misc/weechat.nix @@ -59,5 +59,7 @@ in }; }; + # Don't edit the docbook xml directly, edit the md and generate it: + # `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` meta.doc = ./weechat.xml; } diff --git a/nixos/modules/services/misc/weechat.xml b/nixos/modules/services/misc/weechat.xml index ceabd67060cb..596acbb927b5 100644 --- a/nixos/modules/services/misc/weechat.xml +++ b/nixos/modules/services/misc/weechat.xml @@ -1,50 +1,45 @@ - - WeeChat - - WeeChat is a fast and - extensible IRC client. - -
- Basic Usage - + + WeeChat - By default, the module creates a - systemd - unit which runs the chat client in a detached - screen - session. + WeeChat is a fast and + extensible IRC client. - - - This can be done by enabling the weechat service: - +
+ Basic Usage + + By default, the module creates a + systemd + unit which runs the chat client in a detached + screen + session. + + + This can be done by enabling the weechat + service: + + { ... }: { 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 - - - 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 - support: - + + The service is managed by a dedicated user named + weechat in the state directory + /var/lib/weechat. + +
+
+ Re-attaching to WeeChat + + 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 + support: + + { programs.screen.screenrc = '' multiuser on @@ -52,15 +47,15 @@ ''; } - Now, the session can be re-attached like this: - + + Now, the session can be re-attached like this: + + screen -x weechat/weechat-screen - - - - The session name can be changed using - services.weechat.sessionName. - -
+ + The session name can be changed using + services.weechat.sessionName. + +