add enable option for programs.tmux

This commit is contained in:
Daiderd Jordan 2016-12-12 23:38:53 +01:00
parent 2af32bbcfe
commit d24886a648
No known key found for this signature in database
GPG key ID: D02435D05B810C96
3 changed files with 17 additions and 14 deletions

View file

@ -26,6 +26,14 @@ let
in {
options = {
programs.tmux.enable = mkOption {
type = types.bool;
default = false;
description = ''
Whether to configure tmux.
'';
};
programs.tmux.loginShell = mkOption {
type = types.path;
default = "$SHELL";
@ -83,7 +91,7 @@ in {
};
config = {
config = mkIf cfg.enable {
programs.tmux.tmuxOptions.login-shell.text = if stdenv.isDarwin then ''
set -g default-command "reattach-to-user-namespace ${cfg.loginShell}"