nix-config/checks.nix
2025-06-03 20:04:44 +02:00

20 lines
384 B
Nix

{
self,
flake-utils,
nixpkgs,
...
}:
(flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
formatter = self.formatter.${system};
in
{
checks = {
format = pkgs.runCommand "check-format" {
buildInputs = [ formatter ];
} "${formatter}/bin/nixpkgs-fmt --check ${./.} && touch $out";
};
}
)).checks