diff --git a/README.md b/README.md index 86f5e5a3..63bdbab7 100644 --- a/README.md +++ b/README.md @@ -143,6 +143,7 @@ use nix - [alejandra](https://github.com/kamadorueda/alejandra) - [deadnix](https://github.com/astro/deadnix) +- [flake-checker](https://github.com/DeterminateSystems/flake-checker) - [nil](https://github.com/oxalica/nil) - [nixfmt](https://github.com/serokell/nixfmt/) - [nixpkgs-fmt](https://github.com/nix-community/nixpkgs-fmt) diff --git a/modules/hooks.nix b/modules/hooks.nix index 9e64c0f0..702fea72 100644 --- a/modules/hooks.nix +++ b/modules/hooks.nix @@ -2239,6 +2239,14 @@ in "${binPath} --format ${hooks.flake8.settings.format} ${extendIgnoreStr}"; types = [ "python" ]; }; + flake-checker = { + name = "flake-checker"; + description = "Run health checks on your flake-powered Nix projects."; + package = tools.flake-checker; + entry = "${hooks.flake-checker.package}/bin/flake-checker -f"; + files = "(^flake\\.nix$|^flake\\.lock$)"; + pass_filenames = false; + }; flynt = { name = "flynt"; diff --git a/nix/tools.nix b/nix/tools.nix index c40c14b2..bb9549f4 100644 --- a/nix/tools.nix +++ b/nix/tools.nix @@ -26,6 +26,7 @@ , editorconfig-checker , elixir , elmPackages +, flake-checker ? null , fprettify , git-annex , gptcommit ? null @@ -108,6 +109,7 @@ in eclint editorconfig-checker elixir + flake-checker fprettify go go-tools