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 5, 2024
1 parent d978995 commit a54ee8a
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 a54ee8a

Please sign in to comment.