Add formatter

This commit is contained in:
SebastianStork 2025-10-19 23:20:56 +02:00
parent 83176c294a
commit 453ab36d01
Signed by: SebastianStork
SSH key fingerprint: SHA256:tRrGdjYOwgHxpSc/wTOZQZEjxcb15P0tyXRsbAfd+2Q
2 changed files with 37 additions and 2 deletions

View file

@ -2,6 +2,11 @@
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
treefmt = {
url = "github:numtide/treefmt-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
linkita = {
url = "git+https://codeberg.org/salif/linkita.git";
flake = false;
@ -11,6 +16,7 @@
outputs =
{
nixpkgs,
treefmt,
linkita,
...
}:
@ -28,6 +34,14 @@
'';
};
formatter.${system} = pkgs.nixfmt-tree;
formatter.${system} =
(treefmt.lib.evalModule pkgs {
projectRootFile = "flake.nix";
programs = {
nixfmt.enable = true;
prettier.enable = true;
just.enable = true;
};
}).config.build.wrapper;
};
}