summaryrefslogtreecommitdiff
path: root/modules
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
parentb933e03c15a2503b8b1b04364dbb44436f9625e0 (diff)
add programs.zsh module
Diffstat (limited to 'modules')
-rw-r--r--modules/examples/lnl.nix5
-rw-r--r--modules/programs/zsh.nix37
2 files changed, 40 insertions, 2 deletions
diff --git a/modules/examples/lnl.nix b/modules/examples/lnl.nix
index 692cd84..1ebfae0 100644
--- a/modules/examples/lnl.nix
+++ b/modules/examples/lnl.nix
@@ -37,11 +37,12 @@
set -g status-fg white
'';
+ programs.zsh.enable = true;
+ programs.zsh.shell = "${pkgs.lnl.zsh}/bin/zsh";
+
environment.variables.EDITOR = "vim";
environment.variables.HOMEBREW_CASK_OPTS = "--appdir=/Applications/cask";
- environment.variables.SHELL = "${pkgs.lnl.zsh}/bin/zsh";
-
environment.variables.GIT_SSL_CAINFO = "${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt";
environment.variables.SSL_CERT_FILE = "${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt";
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}";
+
+ };
+}