zsh-autoenv: init at 2017-12-16 (#34932)

This commit is contained in:
Alexey Lebedeff
2018-02-14 06:31:59 +00:00
committed by Jörg Thalheim
parent c2973f986d
commit 6d442efe99
4 changed files with 71 additions and 0 deletions
@@ -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
'';
};
}