{ lib, config, ... }: let cfg = config.myConfig.shell.direnv; in { options.myConfig.shell.direnv = { enable = lib.mkEnableOption "direnv for changing the environment when entering a directory"; }; config = lib.mkIf cfg.enable { programs.direnv = { enable = true; enableBashIntegration = true; enableZshIntegration = true; }; }; }