2024-07-13 20:53:54 +02:00
|
|
|
{
|
|
|
|
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 = {
|
2024-07-13 21:00:36 +02:00
|
|
|
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;
|
2024-07-13 20:53:54 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
})
|