depot/third_party/nixpkgs/nixos/modules/programs/zsh/zsh-autoenv.nix

19 lines
397 B
Nix
Raw Normal View History

{ config, lib, pkgs, ... }:
let
cfg = config.programs.zsh.zsh-autoenv;
in {
options = {
programs.zsh.zsh-autoenv = {
enable = lib.mkEnableOption "zsh-autoenv";
package = lib.mkPackageOption pkgs "zsh-autoenv" { };
};
};
config = lib.mkIf cfg.enable {
programs.zsh.interactiveShellInit = ''
source ${cfg.package}/share/zsh-autoenv/autoenv.zsh
'';
};
}