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 7
7
nixpkgs . url = "github:NixOS/nixpkgs/nixpkgs-unstable" ;
8
8
crane . url = "github:ipetkov/crane" ;
9
9
flake-utils . url = "github:numtide/flake-utils" ;
10
+ treefmt . url = "github:numtide/treefmt-nix" ;
10
11
11
12
advisory-db = {
12
13
url = "github:rustsec/advisory-db" ;
20
21
nixpkgs ,
21
22
crane ,
22
23
flake-utils ,
24
+ treefmt ,
23
25
advisory-db ,
24
26
...
25
27
} :
173
175
nixfmt-rfc-style
174
176
] ;
175
177
} ;
178
+
179
+ formatter = ( treefmt . lib . evalModule pkgs ./treefmt.nix ) . config . build . wrapper ;
176
180
}
177
181
) ;
178
182
# 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