flake-modules: explicitly set the same nixfmt for treefmt + pre-commit

This commit is contained in:
Matt Sturgeon 2024-06-04 16:57:20 +01:00
parent d9789956d9
commit a54ee8ad64
No known key found for this signature in database
GPG key ID: 4F91844CED1A8299

View file

@ -8,12 +8,18 @@
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;
};
};
@ -21,8 +27,8 @@
pre-commit = {
settings.hooks = {
nixfmt = {
package = pkgs.nixfmt-rfc-style;
enable = true;
package = fmt;
};
statix = {
enable = true;