{
  pkgs,
  lib,
  config,
  ...
}:
let
  cfg = config.modules.direnv;
in
{
  options.modules.direnv = {
    enable = lib.mkEnableOption "direnv";
  };
  config = lib.mkIf cfg.enable {
    programs.direnv = {
      enable = true;
      # enableBashIntegration = true; # see note on other shells below
      nix-direnv.enable = true;
    };
  };
}
