nixos-config/home/tmux.nix

39 lines
778 B
Nix
Raw Normal View History

2021-04-19 18:59:24 +02:00
{ config, lib, pkgs, ... }:
let
2022-01-11 16:08:21 +01:00
inherit (lib)
mkEnableOption
mkIf
;
2021-04-19 18:59:24 +02:00
cfg = config.my.home.tmux;
in
{
2022-01-11 16:08:21 +01:00
options.my.home.tmux = {
2021-07-29 12:19:31 +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-01-11 16:08:21 +01: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
};
}