mirror of
https://github.com/SebastianStork/blog.git
synced 2026-01-21 11:41:35 +01:00
Add formatter
This commit is contained in:
parent
83176c294a
commit
453ab36d01
2 changed files with 37 additions and 2 deletions
23
flake.lock
generated
23
flake.lock
generated
|
|
@ -35,7 +35,28 @@
|
|||
"root": {
|
||||
"inputs": {
|
||||
"linkita": "linkita",
|
||||
"nixpkgs": "nixpkgs"
|
||||
"nixpkgs": "nixpkgs",
|
||||
"treefmt": "treefmt"
|
||||
}
|
||||
},
|
||||
"treefmt": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1760889407,
|
||||
"narHash": "sha256-ppIp04fmz+BaTpJs1nIOmPADg02asfQFrFbhb3SmxsE=",
|
||||
"owner": "numtide",
|
||||
"repo": "treefmt-nix",
|
||||
"rev": "3f258dead9fed51f53862366d3a6bc1b622ee7cb",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "treefmt-nix",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
|||
16
flake.nix
16
flake.nix
|
|
@ -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;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue