aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md4
-rw-r--r--root/nix/_treefmt-base.nix29
2 files changed, 31 insertions, 2 deletions
diff --git a/README.md b/README.md
index 9f8bdf0..9504c9a 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
# Monorepo
-vkcku's personal monorepo. This is an attempt to see how much of my life I
-can manage in this single repository as the source of truth.
+vkcku's personal monorepo. This is an attempt to see how much of my life I can
+manage in this single repository as the source of truth.
diff --git a/root/nix/_treefmt-base.nix b/root/nix/_treefmt-base.nix
index d613092..21d7ea3 100644
--- a/root/nix/_treefmt-base.nix
+++ b/root/nix/_treefmt-base.nix
@@ -4,6 +4,31 @@
formatters/linters. This will NOT enable the formatters/linters except
for a few that are used across all projects (nixfmt, typos etc.).
*/
+{ lib, pkgs, ... }:
+let
+ rumdlConfig = (pkgs.formats.toml { }).generate "rumdl.toml" {
+ global = {
+ cache = false;
+ extend-enable = [ "MD060" ];
+ };
+
+ MD013 = {
+ reflow = true;
+ reflow-mode = "normalize";
+ };
+ };
+
+ wrappedRumdl = pkgs.symlinkJoin {
+ name = "rumdl-wrapped";
+ paths = [ pkgs.rumdl ];
+ nativeBuildInputs = [ pkgs.makeBinaryWrapper ];
+ postBuild = ''
+ makeBinaryWrapper "${pkgs.rumdl}/bin/rumdl" "$out/bin/rumdl" \
+ --add-flags "--config ${rumdlConfig}"
+ '';
+ meta.mainProgram = lib.getName pkgs.rumdl;
+ };
+in
{
projectRootFile = "README.md";
@@ -11,6 +36,10 @@
# keep-sorted start block=yes
keep-sorted.enable = true;
nixfmt.enable = true;
+ rumdl-check = {
+ enable = true;
+ package = wrappedRumdl;
+ };
typos.enable = true;
# keep-sorted end
};