summaryrefslogtreecommitdiff
path: root/modules/programs
diff options
context:
space:
mode:
authorDaiderd Jordan <daiderd@gmail.com>2016-12-12 22:00:48 +0100
committerDaiderd Jordan <daiderd@gmail.com>2016-12-12 22:00:48 +0100
commit58f246595ac7d9c8ddeb13fcef1f64eddc7d9908 (patch)
tree5966431798ed1069e2c2921527e0776d0cd2ec77 /modules/programs
parentb933e03c15a2503b8b1b04364dbb44436f9625e0 (diff)
add programs.zsh module
Diffstat (limited to 'modules/programs')
-rw-r--r--modules/programs/zsh.nix37
1 files changed, 37 insertions, 0 deletions
diff --git a/modules/programs/zsh.nix b/modules/programs/zsh.nix
new file mode 100644
index 0000000..ff39d4b
--- /dev/null
+++ b/modules/programs/zsh.nix
@@ -0,0 +1,37 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+let
+
+ cfg = config.programs.zsh;
+
+in
+
+{
+ options = {
+
+ programs.zsh.enable = mkOption {
+ type = types.bool;
+ default = false;
+ description = ''
+ Whether to configure zsh as an interactive shell.
+ '';
+ };
+
+ programs.zsh.shell = mkOption {
+ type = types.path;
+ default = "${pkgs.zsh}/bin/zsh";
+ description = ''
+ Zsh shell to use.
+ '';
+ };
+
+ };
+
+ config = mkIf cfg.enable {
+
+ environment.variables.SHELL = "${cfg.shell}";
+
+ };
+}