feat: Add crowdsec module
This commit is contained in:
parent
09198a416c
commit
b81de99288
5 changed files with 335 additions and 2 deletions
configuration/services
36
configuration/services/crowdsec.nix
Normal file
36
configuration/services/crowdsec.nix
Normal file
|
@ -0,0 +1,36 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
services.crowdsec = {
|
||||
enable = true;
|
||||
|
||||
settings.crowdsec_service.acquisition_path =
|
||||
(pkgs.formats.yaml { }).generate "crowdsec-acquisitions.yaml"
|
||||
{
|
||||
source = "journalctl";
|
||||
journalctl_filter = map (s: "_SYSTEMD_UNIT=${s}") [
|
||||
"conduit.service"
|
||||
"coturn.service"
|
||||
"forgejo.service"
|
||||
"foundryvtt.service"
|
||||
"grafana.service"
|
||||
"minecraft-server.service"
|
||||
# Nextcloud?
|
||||
"tlaternet-webserver.service"
|
||||
"sshd.service"
|
||||
# Wireguard?
|
||||
];
|
||||
labels.type = "syslog";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
# db_config = {
|
||||
# type = "postgresql";
|
||||
# db_path = "/run/postgresql";
|
||||
# user = "crowdsec";
|
||||
# db_name = "crowdsec";
|
||||
# flush = {
|
||||
# max_items = 10000;
|
||||
# max_age = "14d";
|
||||
# };
|
||||
# };
|
Loading…
Add table
Add a link
Reference in a new issue