nixos/services/crowdsec.nix
ediblerope 2b090f1a35 Fix CrowdSec bouncer api_url to resolve null coercion error
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-05 23:05:57 +01:00

30 lines
790 B
Nix

{ config, lib, ... }:
{
config = lib.mkIf (config.networking.hostName == "FredOS-Mediaserver") {
services.crowdsec = {
enable = true;
autoUpdateService = true;
localConfig.acquisitions = [
# SSH
{
source = "journalctl";
journalctl_filter = [ "-u" "sshd" ];
labels.type = "syslog";
}
# Nginx Proxy Manager (Docker logs via journald)
{
source = "journalctl";
journalctl_filter = [ "-u" "docker" "-t" "nginx-proxy-manager" ];
labels.type = "nginx";
}
];
};
# Firewall bouncer — auto-registers to local CrowdSec API
services.crowdsec-firewall-bouncer = {
enable = true;
settings.api_url = "http://127.0.0.1:8080";
};
};
}