Files
nix-config/checks/pre-commit-hooks/default.nix
mjallen18 18e781d388 agents
2026-03-25 13:55:19 -05:00

30 lines
602 B
Nix

{
inputs,
pkgs,
lib,
...
}:
let
inherit (inputs) pre-commit-hooks-nix;
in
pre-commit-hooks-nix.lib.${pkgs.stdenv.hostPlatform.system}.run {
src = ../..;
hooks = {
pre-commit-hook-ensure-sops.enable = true;
treefmt = {
enable = lib.mkForce true;
settings.fail-on-change = lib.mkForce false;
packageOverrides.treefmt = inputs.treefmt-nix.lib.mkWrapper pkgs (
lib.snowfall.fs.get-file "treefmt.nix"
);
};
nixfmt-rfc-style = {
enable = true;
package = pkgs.nixfmt-rfc-style;
};
statix = {
enable = true;
};
};
}