stockholm/lass/2configs/IM.nix

39 lines
917 B
Nix
Raw Normal View History

2021-01-23 18:32:56 +01:00
with (import <stockholm/lib>);
{ config, lib, pkgs, ... }: let
weechat = pkgs.weechat.override {
2022-05-29 19:42:22 +02:00
configure = { availablePlugins, ... }: {
scripts = with pkgs.weechatScripts; [
weechat-matrix
];
};
};
2021-01-23 18:32:56 +01:00
2022-05-29 19:42:22 +02:00
tmux = "/run/current-system/sw/bin/tmux";
2021-01-23 18:32:56 +01:00
in {
imports = [
./bitlbee.nix
];
2022-05-29 19:42:22 +02:00
environment.systemPackages = [ weechat ];
systemd.services.chat = {
2021-01-23 18:32:56 +01:00
description = "chat environment setup";
2022-05-29 19:42:22 +02:00
environment.WEECHAT_HOME = "\$HOME/.weechat";
2021-01-23 18:32:56 +01:00
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
restartIfChanged = false;
path = [
2022-11-01 12:40:36 +01:00
pkgs.rxvt-unicode-unwrapped.terminfo
2021-01-23 18:32:56 +01:00
];
serviceConfig = {
User = "lass";
RemainAfterExit = true;
Type = "oneshot";
2022-05-29 19:42:22 +02:00
ExecStart = "${tmux} -2 new-session -d -s IM ${weechat}/bin/weechat";
ExecStop = "${tmux} kill-session -t IM"; # TODO run save in weechat
2021-01-23 18:32:56 +01:00
};
};
}