about summary refs log tree commit diff
path: root/machines/srv3/coreruleset.nix
blob: c52c8987cd5408adef6ca7c38ef949b97a1a06c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
{ stdenv, fetchFromGitHub }:
stdenv.mkDerivation {
  pname = "coreruleset";
  version = "3.3.0";

  src = fetchFromGitHub {
    owner = "coreruleset";
    repo = "coreruleset";
    rev = "v3.3.0";
    sha256 = "sha256:10z1051iwna5x8b8cl29frs5nx3s6ip7hc4mjkgh7vkck8ly4pjm";
  };

  installPhase = ''
    mkdir $out
    cp crs-setup.conf.example $out/crs-setup.conf
    cp -r rules $out
    for f in rules/*.conf; do
      echo "Include \"$out/$f\"" >> $out/all-rules.conf
    done
  '';
}