From 45f8e2d134e3dd716c5a47d15ab55266cb354ec9 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Sun, 3 Dec 2023 13:14:59 -0800 Subject: add `treefmt` and `pre-commit-hooks` I can now run `nix fmt` or `nix flake check` to check the syntax for various files in this repository. Fixed a deprecation warning for `hugo`: ``` > WARN The author key in site configuration is deprecated. Use params.author.email instead. > WARN The author key in site configuration is deprecated. Use params.author.name instead. ``` --- treefmt.nix | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 treefmt.nix (limited to 'treefmt.nix') diff --git a/treefmt.nix b/treefmt.nix new file mode 100644 index 0000000..e6164a0 --- /dev/null +++ b/treefmt.nix @@ -0,0 +1,8 @@ +{ + projectRootFile = "flake.nix"; + programs = { + nixfmt.enable = true; # nix + taplo.enable = true; # toml + yamlfmt.enable = true; # yaml + }; +} -- cgit v1.2.3