diff --git a/modules/programs/fzf.nix b/modules/programs/fzf.nix
index f945c7d4d..9f1c6522d 100644
--- a/modules/programs/fzf.nix
+++ b/modules/programs/fzf.nix
@@ -88,6 +88,23 @@ in {
'';
};
+ tmux = {
+ enableShellIntegration = mkEnableOption ''
+ setting FZF_TMUX=1 which causes shell integration to use fzf-tmux
+ '';
+
+ shellIntegrationOptions = mkOption {
+ type = types.listOf types.str;
+ default = [ ];
+ example = literalExample ''[ "-d 40%" ]'';
+ description = ''
+ If is set to true,
+ shell integration will use these options for fzf-tmux.
+ See fzf-tmux --help for available options.
+ '';
+ };
+ };
+
enableBashIntegration = mkOption {
default = true;
type = types.bool;
@@ -125,6 +142,8 @@ in {
FZF_CTRL_T_OPTS = cfg.fileWidgetOptions;
FZF_DEFAULT_COMMAND = cfg.defaultCommand;
FZF_DEFAULT_OPTS = cfg.defaultOptions;
+ FZF_TMUX = if cfg.tmux.enableShellIntegration then "1" else null;
+ FZF_TMUX_OPTS = cfg.tmux.shellIntegrationOptions;
});
programs.bash.initExtra = mkIf cfg.enableBashIntegration ''