chore: add treefmt

This commit is contained in:
technofab 2025-08-28 10:35:06 +02:00
parent b0eaa25b77
commit 9c1a29fa9b
No known key found for this signature in database
3 changed files with 33 additions and 3 deletions

View file

@ -1,8 +1,16 @@
{inputs, ...}: let
inherit (inputs) pkgs dslib;
inherit (inputs) pkgs dslib treefmt;
in {
default = dslib.mkShell {
packages = [pkgs.alejandra];
packages = [
(treefmt.mkWrapper pkgs {
programs = {
alejandra.enable = true;
mdformat.enable = true;
};
settings.global.excludes = ["*LICENSE*.md"];
})
];
enterShellCommands."ren".text = "echo Hello rensa!";
};
}

19
cells/repo/flake.lock generated
View file

@ -37,7 +37,24 @@
"root": {
"inputs": {
"devshell": "devshell",
"nixmkdocs": "nixmkdocs"
"nixmkdocs": "nixmkdocs",
"treefmt-nix": "treefmt-nix"
}
},
"treefmt-nix": {
"flake": false,
"locked": {
"lastModified": 1755934250,
"narHash": "sha256-CsDojnMgYsfshQw3t4zjRUkmMmUdZGthl16bXVWgRYU=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "74e1a52d5bd9430312f8d1b8b0354c92c17453e5",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "treefmt-nix",
"type": "github"
}
}
},

View file

@ -2,6 +2,10 @@
inputs = {
devshell.url = "gitlab:rensa-nix/devshell?dir=lib";
nixmkdocs.url = "gitlab:TECHNOFAB/nixmkdocs?dir=lib";
treefmt-nix = {
url = "github:numtide/treefmt-nix";
flake = false;
};
};
outputs = i:
@ -9,5 +13,6 @@
// {
dslib = i.devshell.lib {inherit (i.parent) pkgs;};
doclib = i.nixmkdocs.lib {inherit (i.parent) pkgs;};
treefmt = import i.treefmt-nix;
};
}