Skip to content

Commit

Permalink
flake-modules: explicitly set the same nixfmt for treefmt + pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
MattSturgeon committed Jun 4, 2024
1 parent dfcb49f commit 2b50942
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions flake-modules/dev/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,27 @@

perSystem =
{ pkgs, config, ... }:
let
fmt = pkgs.nixfmt-rfc-style;
in
{
treefmt.config = {
projectRootFile = "flake.nix";

programs = {
nixfmt-rfc-style.enable = true;
nixfmt = {
enable = true;
package = fmt;
};
statix.enable = true;
};
};

pre-commit = {
settings.hooks = {
nixfmt = {
package = pkgs.nixfmt-rfc-style;
enable = true;
package = fmt;
};
statix = {
enable = true;
Expand Down

0 comments on commit 2b50942

Please sign in to comment.