Skip to content

Commit

Permalink
mistral: more crowdsec setup
Browse files Browse the repository at this point in the history
  • Loading branch information
moni-dz committed Dec 29, 2024
1 parent ddc8adb commit 7f148fe
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions hosts/mistral/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
# 5432
];

systemd.services.crowdsec.serviceConfig = {
ExecStartPre =
systemd.services = {
crowdsec.serviceConfig.ExecStartPre =
let
script = pkgs.writeScriptBin "register-bouncer" ''
#!${pkgs.runtimeShell}
Expand All @@ -55,6 +55,8 @@
'';
in
[ "${script}/bin/register-bouncer" ];

crowdsec-update-hub.serviceConfig.ExecStartPost = lib.mkForce "";
};

services = {
Expand All @@ -63,6 +65,12 @@
crowdsec = {
enable = true;
enrollKeyFile = config.age.secrets.crowdsec.path;

settings.acquisitions_path = (pkgs.formats.yaml { }).generate "acquisitions.yaml" {
source = "journalctl";
journalctl_filter = [ "_SYSTEMD_UNIT=sshd.service" ];
labels.type = "syslog";
};
};

crowdsec-firewall-bouncer = {
Expand Down

0 comments on commit 7f148fe

Please sign in to comment.