{ config, lib, ... }: with lib; let cfg = config.nixfiles.modules.direnv; in { options.nixfiles.modules.direnv.enable = mkEnableOption "direnv"; config = mkIf cfg.enable { hm.programs.direnv = { enable = true; config.global = { load_dotenv = true; strict_env = true; warn_timeout = "1h"; }; nix-direnv.enable = true; }; }; }