summary refs log tree commit diff
path: root/nixos/modules/programs
diff options
context:
space:
mode:
authorAlexey Lebedeff <binarin@gmail.com>2018-02-14 07:31:59 +0100
committerJörg Thalheim <Mic92@users.noreply.github.com>2018-02-14 06:31:59 +0000
commit6d442efe9966661c60f22a43397e7b66f1acde84 (patch)
tree7bcc6646ca8a3ac2461f4d133349cd41a773c957 /nixos/modules/programs
parentc2973f986d4fc5da938aaca158a8497751ef35f0 (diff)
downloadnixpkgs-6d442efe9966661c60f22a43397e7b66f1acde84.tar
nixpkgs-6d442efe9966661c60f22a43397e7b66f1acde84.tar.gz
nixpkgs-6d442efe9966661c60f22a43397e7b66f1acde84.tar.bz2
nixpkgs-6d442efe9966661c60f22a43397e7b66f1acde84.tar.lz
nixpkgs-6d442efe9966661c60f22a43397e7b66f1acde84.tar.xz
nixpkgs-6d442efe9966661c60f22a43397e7b66f1acde84.tar.zst
nixpkgs-6d442efe9966661c60f22a43397e7b66f1acde84.zip
zsh-autoenv: init at 2017-12-16 (#34932)
Diffstat (limited to 'nixos/modules/programs')
-rw-r--r--nixos/modules/programs/zsh/zsh-autoenv.nix28
1 files changed, 28 insertions, 0 deletions
diff --git a/nixos/modules/programs/zsh/zsh-autoenv.nix b/nixos/modules/programs/zsh/zsh-autoenv.nix
new file mode 100644
index 00000000000..630114bcda9
--- /dev/null
+++ b/nixos/modules/programs/zsh/zsh-autoenv.nix
@@ -0,0 +1,28 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+let
+  cfg = config.programs.zsh.zsh-autoenv;
+in {
+  options = {
+    programs.zsh.zsh-autoenv = {
+      enable = mkEnableOption "zsh-autoenv";
+      package = mkOption {
+        default = pkgs.zsh-autoenv;
+        defaultText = "pkgs.zsh-autoenv";
+        description = ''
+          Package to install for `zsh-autoenv` usage.
+        '';
+
+        type = types.package;
+      };
+    };
+  };
+
+  config = mkIf cfg.enable {
+    programs.zsh.interactiveShellInit = ''
+      source ${cfg.package}/share/zsh-autoenv/autoenv.zsh
+    '';
+  };
+}