chore(modules/firewall): Rewrite to simplify
All checks were successful
Build all the nodes / ap01 (push) Successful in 1m34s
Build all the nodes / geo02 (push) Successful in 2m22s
Build all the nodes / bridge01 (push) Successful in 2m27s
Build all the nodes / hypervisor01 (push) Successful in 2m29s
Build all the nodes / geo01 (push) Successful in 2m30s
Build all the nodes / netcore02 (push) Successful in 34s
Build all the nodes / hypervisor02 (push) Successful in 1m36s
Build all the nodes / compute01 (push) Successful in 3m15s
Build all the nodes / hypervisor03 (push) Successful in 1m46s
Build all the nodes / rescue01 (push) Successful in 1m56s
Build all the nodes / tower01 (push) Successful in 1m43s
Build all the nodes / storage01 (push) Successful in 2m10s
Build all the nodes / vault01 (push) Successful in 2m5s
Build the shell / build-shell (push) Successful in 43s
Run pre-commit on all files / pre-commit (push) Successful in 36s
Build all the nodes / web02 (push) Successful in 1m41s
Build all the nodes / web01 (push) Successful in 2m12s
Build all the nodes / web03 (push) Successful in 1m37s
All checks were successful
Build all the nodes / ap01 (push) Successful in 1m34s
Build all the nodes / geo02 (push) Successful in 2m22s
Build all the nodes / bridge01 (push) Successful in 2m27s
Build all the nodes / hypervisor01 (push) Successful in 2m29s
Build all the nodes / geo01 (push) Successful in 2m30s
Build all the nodes / netcore02 (push) Successful in 34s
Build all the nodes / hypervisor02 (push) Successful in 1m36s
Build all the nodes / compute01 (push) Successful in 3m15s
Build all the nodes / hypervisor03 (push) Successful in 1m46s
Build all the nodes / rescue01 (push) Successful in 1m56s
Build all the nodes / tower01 (push) Successful in 1m43s
Build all the nodes / storage01 (push) Successful in 2m10s
Build all the nodes / vault01 (push) Successful in 2m5s
Build the shell / build-shell (push) Successful in 43s
Run pre-commit on all files / pre-commit (push) Successful in 36s
Build all the nodes / web02 (push) Successful in 1m41s
Build all the nodes / web01 (push) Successful in 2m12s
Build all the nodes / web03 (push) Successful in 1m37s
Also disable the ai filter for nodes that don't have nginx enabled
This commit is contained in:
parent
e0cfd1ceb0
commit
3c9c38fb03
2 changed files with 55 additions and 59 deletions
|
@ -3,9 +3,9 @@
|
||||||
# SPDX-License-Identifier: EUPL-1.2
|
# SPDX-License-Identifier: EUPL-1.2
|
||||||
|
|
||||||
{
|
{
|
||||||
pkgs,
|
config,
|
||||||
lib,
|
lib,
|
||||||
name,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
@ -13,6 +13,7 @@ let
|
||||||
inherit (lib)
|
inherit (lib)
|
||||||
concatStringsSep
|
concatStringsSep
|
||||||
length
|
length
|
||||||
|
optionalAttrs
|
||||||
replicate
|
replicate
|
||||||
splitString
|
splitString
|
||||||
;
|
;
|
||||||
|
@ -85,7 +86,9 @@ in
|
||||||
|
|
||||||
stop = [ (nft "delete table inet reaction") ];
|
stop = [ (nft "delete table inet reaction") ];
|
||||||
|
|
||||||
streams = streams'.default // (streams'.${name} or { });
|
streams = {
|
||||||
|
inherit (streams') ssh;
|
||||||
|
} // (optionalAttrs config.services.nginx.enable { inherit (streams') ai-crawlers; });
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,8 +23,9 @@ let
|
||||||
cmd = act "delete";
|
cmd = act "delete";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
in
|
||||||
|
|
||||||
available = {
|
{
|
||||||
ai-crawlers = {
|
ai-crawlers = {
|
||||||
cmd = [
|
cmd = [
|
||||||
"tail"
|
"tail"
|
||||||
|
@ -79,12 +80,4 @@ let
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
in
|
|
||||||
|
|
||||||
builtins.mapAttrs (_: builtins.foldl' (a: s: a // { ${s} = available.${s}; }) { }) {
|
|
||||||
default = [
|
|
||||||
"ai-crawlers"
|
|
||||||
"ssh"
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue