47 lines
876 B
Nix
47 lines
876 B
Nix
|
{ lib, config, pkgs, ... }:
|
||
|
with lib;
|
||
|
let
|
||
|
tmuxExtraConfig = ''
|
||
|
set -ag terminal-overrides ",xterm-256color:RGB"
|
||
|
'';
|
||
|
in
|
||
|
{
|
||
|
options.enableTermux = mkOption {
|
||
|
type = types.bool;
|
||
|
default = true;
|
||
|
example = false;
|
||
|
description = ''
|
||
|
Enable termux and the associated config.
|
||
|
'';
|
||
|
};
|
||
|
|
||
|
config.programs.tmux = mkIf config.enableTermux {
|
||
|
enable = true;
|
||
|
|
||
|
# Make windows count start to 1
|
||
|
baseIndex = 1;
|
||
|
|
||
|
# Use 24h clock
|
||
|
clock24 = true;
|
||
|
|
||
|
shell = if config.enableFishShell then "${pkgs.fish}/bin/fish" else "${pkgs.bash}/bin/bash";
|
||
|
|
||
|
keyMode = "vi";
|
||
|
|
||
|
tmuxp.enable = true;
|
||
|
|
||
|
terminal = "tmux-256color";
|
||
|
|
||
|
plugins = with pkgs.tmuxPlugins; [
|
||
|
{
|
||
|
plugin = nord;
|
||
|
extraConfig = ''
|
||
|
set -g @plugin "arcticicestudio/nord-tmux"
|
||
|
'';
|
||
|
}
|
||
|
];
|
||
|
|
||
|
extraConfig = tmuxExtraConfig;
|
||
|
};
|
||
|
}
|