pub-solar-os/profiles/develop/tmux/default.nix

55 lines
926 B
Nix
Raw Normal View History

2019-12-15 07:25:04 +00:00
{ lib, pkgs, ... }:
let
inherit (builtins)
readFile
concatStringsSep
;
inherit (lib)
removePrefix
;
pluginConf = plugins:
concatStringsSep "\n\n"
2019-12-15 08:08:22 +00:00
(
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
];
in
{
2019-12-15 08:00:01 +00:00
environment.shellAliases = {
tx = "tmux new-session -A -s $USER";
};
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}
'';
};
}