File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change 77 nixpkgs . url = "github:NixOS/nixpkgs/nixpkgs-unstable" ;
88 crane . url = "github:ipetkov/crane" ;
99 flake-utils . url = "github:numtide/flake-utils" ;
10+ treefmt . url = "github:numtide/treefmt-nix" ;
1011
1112 advisory-db = {
1213 url = "github:rustsec/advisory-db" ;
2021 nixpkgs ,
2122 crane ,
2223 flake-utils ,
24+ treefmt ,
2325 advisory-db ,
2426 ...
2527 } :
173175 nixfmt-rfc-style
174176 ] ;
175177 } ;
178+
179+ formatter = ( treefmt . lib . evalModule pkgs ./treefmt.nix ) . config . build . wrapper ;
176180 }
177181 ) ;
178182 # Sets substituters to avoid locally building something already built
Original file line number Diff line number Diff line change 1+ { pkgs , ... } :
2+ {
3+ projectRootFile = "flake.nix" ;
4+
5+ programs = {
6+ taplo . enable = true ;
7+ rustfmt = {
8+ enable = true ;
9+ edition = "2021" ;
10+ } ;
11+ nixfmt . enable = true ;
12+ } ;
13+ }
You can’t perform that action at this time.
0 commit comments