nixos-config/home/tmux.nix

45 lines
804 B
Nix
Raw Permalink Normal View History

2022-04-10 11:54:58 +02:00
{
config,
lib,
pkgs,
...
}: let
inherit
(lib)
2022-01-11 16:08:21 +01:00
mkEnableOption
mkIf
2022-04-10 11:54:58 +02:00
;
2022-01-11 16:08:21 +01:00
2021-04-19 18:59:24 +02:00
cfg = config.my.home.tmux;
2022-04-10 11:54:58 +02:00
in {
2022-01-11 16:08:21 +01:00
options.my.home.tmux = {
2022-04-10 11:54:58 +02:00
enable = (mkEnableOption "tmux dotfiles") // {default = true;};
2021-04-19 18:59:24 +02:00
};
2022-01-11 16:08:21 +01:00
config = mkIf cfg.enable {
2021-06-21 17:47:58 +02:00
programs.tmux = {
enable = true;
baseIndex = 1;
terminal = "screen-256color";
clock24 = true;
2021-06-21 17:30:42 +02:00
2022-04-10 11:54:58 +02:00
plugins = let
inherit (pkgs) tmuxPlugins;
in [
2021-06-21 17:47:58 +02:00
{
plugin = tmuxPlugins.cpu;
extraConfig = ''
set -g status-right 'CPU: #{cpu_percentage} | %a %d-%h %H:%M '
'';
}
{
plugin = tmuxPlugins.tmux-colors-solarized;
extraConfig = ''
set -g @colors-solarized 'light'
'';
}
];
};
2021-04-19 18:59:24 +02:00
};
}