2020-04-24 23:36:52 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
let
|
|
|
|
cfg = config.programs.zsh.zsh-autoenv;
|
|
|
|
in {
|
|
|
|
options = {
|
|
|
|
programs.zsh.zsh-autoenv = {
|
2024-05-15 15:35:15 +00:00
|
|
|
enable = lib.mkEnableOption "zsh-autoenv";
|
|
|
|
package = lib.mkPackageOption pkgs "zsh-autoenv" { };
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
config = lib.mkIf cfg.enable {
|
2020-04-24 23:36:52 +00:00
|
|
|
programs.zsh.interactiveShellInit = ''
|
|
|
|
source ${cfg.package}/share/zsh-autoenv/autoenv.zsh
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
}
|