mirror of
https://github.com/SebastianStork/blog.git
synced 2026-01-21 12:51: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": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"linkita": "linkita",
|
"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 = {
|
inputs = {
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
|
|
||||||
|
treefmt = {
|
||||||
|
url = "github:numtide/treefmt-nix";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
|
||||||
linkita = {
|
linkita = {
|
||||||
url = "git+https://codeberg.org/salif/linkita.git";
|
url = "git+https://codeberg.org/salif/linkita.git";
|
||||||
flake = false;
|
flake = false;
|
||||||
|
|
@ -11,6 +16,7 @@
|
||||||
outputs =
|
outputs =
|
||||||
{
|
{
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
|
treefmt,
|
||||||
linkita,
|
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