2018-01-19 12:30:41 +00:00
|
|
|
with (import <stockholm/lib>);
|
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
let
|
|
|
|
tmux = pkgs.writeDashBin "tmux" ''
|
|
|
|
export TERM=xterm-256color
|
|
|
|
exec ${pkgs.tmux}/bin/tmux -f ${pkgs.writeText "tmux.conf" ''
|
|
|
|
set-option -g default-terminal screen-256color
|
|
|
|
''} "$@"
|
|
|
|
'';
|
|
|
|
in {
|
|
|
|
|
|
|
|
services.bitlbee = {
|
|
|
|
enable = true;
|
|
|
|
portNumber = 6666;
|
|
|
|
plugins = [
|
|
|
|
pkgs.bitlbee-facebook
|
|
|
|
pkgs.bitlbee-steam
|
|
|
|
pkgs.bitlbee-discord
|
|
|
|
];
|
|
|
|
libpurple_plugins = [ pkgs.telegram-purple ];
|
|
|
|
};
|
|
|
|
|
|
|
|
users.extraUsers.chat = {
|
|
|
|
home = "/home/chat";
|
|
|
|
uid = genid "chat";
|
|
|
|
useDefaultShell = true;
|
|
|
|
createHome = true;
|
|
|
|
openssh.authorizedKeys.keys = with config.krebs.users; [
|
|
|
|
jeschli.pubkey
|
|
|
|
jeschli-bln.pubkey
|
|
|
|
jeschli-brauerei.pubkey
|
2019-09-11 23:32:45 +00:00
|
|
|
jeschli-bolide.pubkey
|
2018-01-19 12:30:41 +00:00
|
|
|
];
|
2018-07-17 17:47:49 +00:00
|
|
|
packages = [ tmux ];
|
2018-01-19 12:30:41 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
systemd.services.chat = {
|
|
|
|
description = "chat environment setup";
|
|
|
|
after = [ "network.target" ];
|
|
|
|
wantedBy = [ "multi-user.target" ];
|
|
|
|
|
|
|
|
restartIfChanged = false;
|
|
|
|
|
|
|
|
path = [
|
|
|
|
pkgs.rxvt_unicode.terminfo
|
|
|
|
];
|
|
|
|
|
|
|
|
serviceConfig = {
|
|
|
|
User = "chat";
|
|
|
|
RemainAfterExit = true;
|
|
|
|
Type = "oneshot";
|
|
|
|
ExecStart = "${tmux}/bin/tmux -2 new-session -d -s IM ${pkgs.weechat}/bin/weechat";
|
|
|
|
ExecStop = "${tmux}/bin/tmux kill-session -t IM";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|