From d24886a64849ca0a3b85a835ede37e75f3484058 Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Mon, 12 Dec 2016 23:38:53 +0100 Subject: add enable option for programs.tmux --- modules/programs/tmux.nix | 10 +++++++++- modules/programs/zsh.nix | 5 +++++ 2 files changed, 14 insertions(+), 1 deletion(-) (limited to 'modules/programs') diff --git a/modules/programs/tmux.nix b/modules/programs/tmux.nix index 5f8264d..9aadfaa 100644 --- a/modules/programs/tmux.nix +++ b/modules/programs/tmux.nix @@ -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}" diff --git a/modules/programs/zsh.nix b/modules/programs/zsh.nix index 608f5d6..ddf88ac 100644 --- a/modules/programs/zsh.nix +++ b/modules/programs/zsh.nix @@ -64,6 +64,11 @@ in config = mkIf cfg.enable { + environment.systemPackages = + [ # Include zsh package + pkgs.zsh + ]; + environment.variables.SHELL = "${cfg.shell}"; environment.etc."zshenv".text = '' -- cgit v1.2.3