summaryrefslogtreecommitdiff
path: root/hosts/omega-relay/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'hosts/omega-relay/default.nix')
-rw-r--r--hosts/omega-relay/default.nix46
1 files changed, 42 insertions, 4 deletions
diff --git a/hosts/omega-relay/default.nix b/hosts/omega-relay/default.nix
index 542b843..4d89763 100644
--- a/hosts/omega-relay/default.nix
+++ b/hosts/omega-relay/default.nix
@@ -54,7 +54,7 @@
{
prometheus.enableExporters = true;
cgit = {
- enable = true;
+ enable = true;
domain = "git.wilkuu.nl";
};
desecDyn = {
@@ -153,6 +153,21 @@
maxtime = "168h"; # Do not ban for more than 1 week
overalljails = true; # Calculate the bantime based on all the violations
};
+ jails = {
+ nginx-http-auth = ''
+ enabled = true
+ filter = nginx-http-auth
+ logpath = /var/log/nginx/error.log
+ maxretry = 5
+ '';
+
+ nginx-badbots = ''
+ enabled = true
+ filter = nginx-badbots
+ logpath = /var/log/nginx/access.log
+ maxretry = 2
+ '';
+ };
};
virtualisation = {
@@ -170,6 +185,7 @@
domain = if isVM then "omega-relay.local" else "wilkuu.xyz";
in
{
+ statusPage = true;
enable = true;
virtualHosts."${domain}" = {
enableACME = !isVM;
@@ -265,9 +281,31 @@
};
};
- services.prometheus.exporters.unbound = {
- enable = true;
-
+ services.prometheus.exporters = {
+ unbound = {
+ enable = true;
+ group = "unbound";
+ unbound = {
+ host = "unix:///run/unbound/unbound.ctl";
+ key = "/var/lib/unbound/unbound_control.key";
+ certificate = "/var/lib/unbound/unbound_control.pem";
+ ca = "/var/lib/unbound/unbound_server.pem";
+ };
+ };
+ nginxlog = {
+ enable = true;
+ group = "nginx";
+ settings.namespaces = [
+ {
+ name = "default";
+ format = "$remote_addr - $remote_user [$time_local] \"$request\" $status $body_bytes_sent \"$http_referer\" \"$http_user_agent\"";
+ source.files = [
+ "/var/log/nginx/access.log"
+ "/var/log/nginx/error.log"
+ ];
+ }
+ ];
+ };
};
services.resolved = {