dotfiles/checks/pre-commit/default.nix
magic_rb ecc01a1135
Disable ip-search pre-commit hook
Signed-off-by: magic_rb <magic_rb@redalder.org>
2024-07-13 21:00:36 +02:00

53 lines
997 B
Nix

{
inputs,
system,
lib,
pkgs,
...
}: let
inherit
(lib)
mkIf
elem
;
supportedSystems = [
"x86_64-linux"
"aarch64-linux"
];
in
mkIf (elem system supportedSystems) (inputs.pre-commit-hooks.lib.${system}.run {
imports = [
./modules/ip-search.nix
{
_module.args = {
inherit inputs;
};
}
];
src = ./../..;
hooks = {
alejandra.enable = true;
## produces a lot of annoying lints, disable until specific lints can be disabled per file
## https://github.com/oppiliappan/statix/issues/61
# statix.enable = true;
ip-search = {
permittedIpv4Addresses = [
"127.0.0.1"
"8.8.8.8"
"64.225.104.221"
"93.184.77.2"
"67.207.67.3"
"64.225.96.1"
"5.5.5.5"
"255.255.255.255"
"2.9.0.1"
"127.0.0.0"
];
## disable for now
enable = false;
};
};
})