about summary refs log tree commit diff
path: root/machines/srv1/coreruleset.nix
diff options
context:
space:
mode:
authorPatryk Niedźwiedziński <pniedzwiedzinski19@gmail.com>2021-03-21 11:04:53 +0100
committerPatryk Niedźwiedziński <pniedzwiedzinski19@gmail.com>2021-03-21 11:04:53 +0100
commita572639f05ebb8d88cb8fe283785edd25aa1c49d (patch)
tree1331819ff515b34c3ee088b0d8ea16d7f6cb95ec /machines/srv1/coreruleset.nix
parentbfe18514b8f4c2b9cd9e1ad9fb8507ca46e5f120 (diff)
downloaddots-a572639f05ebb8d88cb8fe283785edd25aa1c49d.tar.gz
dots-a572639f05ebb8d88cb8fe283785edd25aa1c49d.zip
Add modsecurity
Diffstat (limited to 'machines/srv1/coreruleset.nix')
-rw-r--r--machines/srv1/coreruleset.nix21
1 files changed, 21 insertions, 0 deletions
diff --git a/machines/srv1/coreruleset.nix b/machines/srv1/coreruleset.nix
new file mode 100644
index 0000000..c52c898
--- /dev/null
+++ b/machines/srv1/coreruleset.nix
@@ -0,0 +1,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
+  '';
+}