summaryrefslogtreecommitdiffstats
path: root/nin/2configs/im.nix
blob: b078dbd539627d5c2f4b9ea83a341d8cd6f9b1fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{ config, lib, pkgs, ... }:
with import <stockholm/lib>;
{
  environment.systemPackages = with pkgs; [
    (pkgs.writeDashBin "im" ''
      export PATH=${makeSearchPath "bin" (with pkgs; [
        tmux
        gnugrep
        weechat
      ])}
      ssh chat@onondaga
      if tmux list-sessions -F\#S | grep -q '^im''$'; then
        exec tmux attach -t im
      else
        exec tmux new -s im weechat
      fi
    '')
  ];
}