From 58a2956870af6110d4298ca979dfaaf4941eacc2 Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Sat, 16 Feb 2019 21:05:32 +0100 Subject: tmux: add defaultCommand option --- modules/programs/tmux.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'modules/programs') diff --git a/modules/programs/tmux.nix b/modules/programs/tmux.nix index 206ac7e..f3e3095 100644 --- a/modules/programs/tmux.nix +++ b/modules/programs/tmux.nix @@ -80,6 +80,11 @@ in description = "Cater to iTerm2 and its tmux integration, as appropriate."; }; + programs.tmux.defaultCommand = mkOption { + type = types.either types.str types.package; + description = "The default command to use for tmux panes."; + }; + programs.tmux.tmuxOptions = mkOption { internal = true; type = types.attrsOf (types.submodule text); @@ -111,8 +116,10 @@ in source-file -q /etc/tmux.conf.local ''; + programs.tmux.defaultCommand = mkDefault config.environment.loginShell; + programs.tmux.tmuxOptions.login-shell.text = '' - set -g default-command "${config.environment.loginShell}" + set -g default-command "${cfg.defaultCommand}" ''; programs.tmux.tmuxOptions.sensible.text = mkIf cfg.enableSensible '' -- cgit v1.2.3