nixos-config/modules/workstation/home-manager/termux.nix

52 lines
884 B
Nix
Raw Normal View History

2024-04-11 20:15:47 +02:00
{
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;
};
}