summaryrefslogtreecommitdiffstats
path: root/nin/2configs
diff options
context:
space:
mode:
authornin <nin@c-base.org>2018-02-27 22:39:08 +0100
committernin <nin@c-base.org>2018-02-27 22:39:08 +0100
commit23947993b74ae83e4f4042a77b14a67f5a5e52e0 (patch)
tree1c457c4b7072a331f2096be854981bf5a93ccb65 /nin/2configs
parentc878c43476c407310537090f5d6cf2482ead4d3e (diff)
nin im: copy irc script from tv
Diffstat (limited to 'nin/2configs')
-rw-r--r--nin/2configs/im.nix19
1 files changed, 19 insertions, 0 deletions
diff --git a/nin/2configs/im.nix b/nin/2configs/im.nix
new file mode 100644
index 0000000..b078dbd
--- /dev/null
+++ b/nin/2configs/im.nix
@@ -0,0 +1,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
+ '')
+ ];
+}