helm/modules/shell/direnv.nix

16 lines
311 B
Nix
Raw Normal View History

2020-03-28 22:48:43 -07:00
{ config, options, lib, pkgs, ... }:
2019-08-06 10:56:54 -07:00
2020-03-28 22:48:43 -07:00
with lib;
with lib.my;
let cfg = config.modules.shell.direnv;
in {
2020-03-28 22:48:43 -07:00
options.modules.shell.direnv = {
enable = mkBoolOpt false;
2020-03-28 22:48:43 -07:00
};
config = mkIf cfg.enable {
user.packages = [ pkgs.direnv ];
modules.shell.zsh.rcInit = ''eval "$(direnv hook zsh)"'';
2020-01-12 15:17:17 -08:00
};
2019-08-06 10:56:54 -07:00
}