2019-12-15 07:25:04 +00:00
|
|
|
{ lib, pkgs, ... }:
|
|
|
|
let
|
2020-01-04 05:06:31 +00:00
|
|
|
inherit (builtins) readFile concatStringsSep;
|
2019-12-15 07:25:04 +00:00
|
|
|
|
2020-01-04 05:06:31 +00:00
|
|
|
inherit (lib) removePrefix;
|
2019-12-15 07:25:04 +00:00
|
|
|
|
|
|
|
pluginConf = plugins:
|
2020-01-04 05:06:31 +00:00
|
|
|
concatStringsSep "\n\n" (map (plugin:
|
|
|
|
let name = removePrefix "tmuxplugin-" plugin.name;
|
|
|
|
in "run-shell ${plugin}/share/tmux-plugins/${name}/${name}.tmux")
|
|
|
|
plugins);
|
2019-12-15 07:25:04 +00:00
|
|
|
|
|
|
|
plugins = with pkgs.tmuxPlugins; [
|
|
|
|
copycat
|
|
|
|
open
|
|
|
|
resurrect
|
|
|
|
yank
|
|
|
|
vim-tmux-navigator
|
|
|
|
];
|
2020-01-04 05:06:31 +00:00
|
|
|
in {
|
|
|
|
environment.shellAliases = { tx = "tmux new-session -A -s $USER"; };
|
2019-12-15 08:00:01 +00:00
|
|
|
|
2019-12-15 07:25:04 +00:00
|
|
|
programs.tmux = {
|
|
|
|
enable = true;
|
|
|
|
aggressiveResize = true;
|
|
|
|
escapeTime = 10;
|
|
|
|
historyLimit = 5000;
|
|
|
|
keyMode = "vi";
|
|
|
|
shortcut = "a";
|
|
|
|
terminal = "tmux-256color";
|
|
|
|
baseIndex = 1;
|
|
|
|
extraTmuxConf = ''
|
|
|
|
${readFile ./tmuxline.conf}
|
|
|
|
|
|
|
|
${readFile ./tmux.conf}
|
|
|
|
|
|
|
|
${pluginConf plugins}
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
}
|