diff options
author | jeschli <jeschli@gmail.com> | 2018-02-28 20:10:42 +0000 |
---|---|---|
committer | jeschli <jeschli@gmail.com> | 2018-02-28 20:10:42 +0000 |
commit | a7e49dd5fc590ba2ccb26d559d672767c87a7692 (patch) | |
tree | 3d0fb66d17085f1288037da1b4d9987fa402e40e /jeschli/2configs/IM.nix | |
parent | 4a2af184e6846f80b139357c6230558cd8785b10 (diff) | |
parent | 4c0d0f64ed21d3d7292bb5e8900d973e649375c1 (diff) |
Merge branch 'staging/jeschli' of prism.i:stockholm into staging/jeschli
Diffstat (limited to 'jeschli/2configs/IM.nix')
-rw-r--r-- | jeschli/2configs/IM.nix | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/jeschli/2configs/IM.nix b/jeschli/2configs/IM.nix new file mode 100644 index 000000000..171b78242 --- /dev/null +++ b/jeschli/2configs/IM.nix @@ -0,0 +1,56 @@ +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 + ]; + packages = [ tmux ]; + }; + + + 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"; + }; + }; +} |