helm/modules/shell/tmux.nix

27 lines
749 B
Nix
Raw Normal View History

2020-01-12 15:17:35 -08:00
{ config, lib, pkgs, ... }:
{
my = {
packages = with pkgs; [
# The developer of tmux chooses not to add XDG support for religious
# reasons (see tmux/tmux#142). Fortunately, nix offers a simple
# workaround:
(writeScriptBin "tmux" ''
#!${stdenv.shell}
exec ${tmux}/bin/tmux -f "$TMUX_HOME/config" "$@"
'')
];
env.TMUX_HOME = "$XDG_CONFIG_HOME/tmux";
env.TMUXIFIER = "$XDG_DATA_HOME/tmuxifier";
env.TMUXIFIER_LAYOUT_PATH = "$XDG_DATA_HOME/tmuxifier";
env.PATH = [ "$TMUXIFIER/bin" ];
zsh.rc = ''
_cache tmuxifier init -
2020-01-17 01:22:50 -08:00
${lib.readFile <config/tmux/aliases.zsh>}
2020-01-12 15:17:35 -08:00
'';
2020-01-17 01:22:50 -08:00
home.xdg.configFile."tmux" = { source = <config/tmux>; recursive = true; };
2020-01-12 15:17:35 -08:00
};
}