From 6d442efe9966661c60f22a43397e7b66f1acde84 Mon Sep 17 00:00:00 2001 From: Alexey Lebedeff Date: Wed, 14 Feb 2018 07:31:59 +0100 Subject: zsh-autoenv: init at 2017-12-16 (#34932) --- nixos/modules/programs/zsh/zsh-autoenv.nix | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 nixos/modules/programs/zsh/zsh-autoenv.nix (limited to 'nixos/modules/programs') 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 + ''; + }; +} -- cgit 1.4.1