stockholm/lass/2configs/IM.nix

39 lines
917 B
Nix
Raw Normal View History

2021-01-23 17:32:56 +00:00
with (import <stockholm/lib>);
{ config, lib, pkgs, ... }: let
weechat = pkgs.weechat.override {
2022-05-29 17:42:22 +00:00
configure = { availablePlugins, ... }: {
scripts = with pkgs.weechatScripts; [
weechat-matrix
];
};
};
2021-01-23 17:32:56 +00:00
2022-05-29 17:42:22 +00:00
tmux = "/run/current-system/sw/bin/tmux";
2021-01-23 17:32:56 +00:00
in {
imports = [
./bitlbee.nix
];
2022-05-29 17:42:22 +00:00
environment.systemPackages = [ weechat ];
systemd.services.chat = {
2021-01-23 17:32:56 +00:00
description = "chat environment setup";
2022-05-29 17:42:22 +00:00
environment.WEECHAT_HOME = "\$HOME/.weechat";
2021-01-23 17:32:56 +00:00
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
restartIfChanged = false;
path = [
2022-11-01 11:40:36 +00:00
pkgs.rxvt-unicode-unwrapped.terminfo
2021-01-23 17:32:56 +00:00
];
serviceConfig = {
User = "lass";
RemainAfterExit = true;
Type = "oneshot";
2022-05-29 17:42:22 +00: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 17:32:56 +00:00
};
};
}