diff --git a/modules/hooks.nix b/modules/hooks.nix index 05f78c8d..df3e7aa5 100644 --- a/modules/hooks.nix +++ b/modules/hooks.nix @@ -1623,6 +1623,28 @@ in }; }; }; + rumdl = mkOption { + description = "rumdl hook"; + type = types.submodule { + imports = [ hookModule ]; + options.settings = { + configuration = + mkOption { + type = types.attrs; + description = + "See https://github.com/rvben/rumdl?tab=readme-ov-file#configuration"; + default = { }; + example = { + configuration = { + MD013 = { + line-length = 100; + }; + }; + }; + }; + }; + }; + }; rustfmt = mkOption { description = '' Additional rustfmt settings @@ -2185,7 +2207,7 @@ in # PLEASE keep this sorted alphabetically. config.hooks = mapAttrs (_: mapAttrs (_: mkDefault)) - rec { + { actionlint = { name = "actionlint"; @@ -3895,6 +3917,21 @@ lib.escapeShellArgs (lib.concatMap (ext: [ "--ghc-opt" "-X${ext}" ]) hooks.fourm entry = "${hooks.ruff.package}/bin/ruff format"; types = [ "python" ]; }; + rumdl = + let + cmdArgs = + mkCmdArgs + (with hooks.rumdl.settings; [ + [ (configuration != { }) " --config ${toml.generate ".rumdl.toml" configuration}" ] + ]); + in + { + name = "rumdl"; + description = "Style checker and linter for rumdl files."; + package = tools.rumdl; + entry = "${hooks.rumdl.package}/bin/rumdl check ${cmdArgs}"; + files = "\\.md$"; + }; rustfmt = let mkAdditionalArgs = args: lib.optionalString (args != "") " -- ${args}"; diff --git a/nix/tools.nix b/nix/tools.nix index e64992ea..d48623ed 100644 --- a/nix/tools.nix +++ b/nix/tools.nix @@ -71,6 +71,7 @@ , ripsecrets ? placeholder "ripsecrets" , reuse , ruff ? placeholder "ruff" +, rumdl , rustfmt , selene , shellcheck @@ -171,6 +172,7 @@ in revive ripsecrets ruff + rumdl rustfmt selene shellcheck