This repository has no description
886 B
37 lines
1{ config, lib, pkgs, ... }: let
2 weechat = pkgs.weechat.override {
3 configure = { availablePlugins, ... }: {
4 scripts = with pkgs.weechatScripts; [
5 weechat-matrix
6 ];
7 };
8 };
9
10 tmux = "/run/current-system/sw/bin/tmux";
11
12in {
13 imports = [
14 ./bitlbee.nix
15 ];
16 environment.systemPackages = [ weechat ];
17 systemd.services.chat = {
18 description = "chat environment setup";
19 environment.WEECHAT_HOME = "\$HOME/.weechat";
20 after = [ "network.target" ];
21 wantedBy = [ "multi-user.target" ];
22
23 restartIfChanged = false;
24
25 path = [
26 pkgs.rxvt-unicode-unwrapped.terminfo
27 ];
28
29 serviceConfig = {
30 User = "lass";
31 RemainAfterExit = true;
32 Type = "oneshot";
33 ExecStart = "${tmux} -2 new-session -d -s IM ${weechat}/bin/weechat";
34 ExecStop = "${tmux} kill-session -t IM"; # TODO run save in weechat
35 };
36 };
37}