summaryrefslogtreecommitdiff
path: root/modules/programs
diff options
context:
space:
mode:
authorDaiderd Jordan <daiderd@gmail.com>2019-02-16 21:05:32 +0100
committerDaiderd Jordan <daiderd@gmail.com>2019-02-16 21:05:32 +0100
commit58a2956870af6110d4298ca979dfaaf4941eacc2 (patch)
tree1a9c18c27123a0f565811f4b6b76c97f605bb64e /modules/programs
parent1464d9efd3930dafecb45668e6c58349041ea830 (diff)
tmux: add defaultCommand option
Diffstat (limited to 'modules/programs')
-rw-r--r--modules/programs/tmux.nix9
1 files changed, 8 insertions, 1 deletions
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 ''