about summary refs log tree commit diff
path: root/users/grfn/system/system/machines/mugwump.nix
diff options
context:
space:
mode:
Diffstat (limited to 'users/grfn/system/system/machines/mugwump.nix')
-rw-r--r--users/grfn/system/system/machines/mugwump.nix34
1 files changed, 2 insertions, 32 deletions
diff --git a/users/grfn/system/system/machines/mugwump.nix b/users/grfn/system/system/machines/mugwump.nix
index f9b6e0a1da..6a95635c90 100644
--- a/users/grfn/system/system/machines/mugwump.nix
+++ b/users/grfn/system/system/machines/mugwump.nix
@@ -1,4 +1,4 @@
-{ config, lib, pkgs, modulesPath, ... }:
+{ config, lib, pkgs, modulesPath, depot, ... }:
 
 with lib;
 
@@ -6,6 +6,7 @@ with lib;
   imports = [
     ../modules/common.nix
     (modulesPath + "/installer/scan/not-detected.nix")
+    "${depot.path}/ops/modules/prometheus-fail2ban-exporter.nix"
   ];
 
   networking.hostName = "mugwump";
@@ -158,11 +159,6 @@ with lib;
           "systemd"
           "tcpstat"
           "wifi"
-          "textfile"
-        ];
-
-        extraFlags = [
-          "--collector.textfile.directory=/var/lib/prometheus/node-exporter"
         ];
       };
 
@@ -230,32 +226,6 @@ with lib;
     }];
   };
 
-  systemd.services."prometheus-fail2ban-exporter" = {
-    wantedBy = [ "multi-user.target" ];
-    after = [ "network.target" "fail2ban.service" ];
-    serviceConfig = {
-      User = "root";
-      Type = "oneshot";
-      ExecStart = pkgs.writeShellScript "prometheus-fail2ban-exporter" ''
-        set -eo pipefail
-        mkdir -p /var/lib/prometheus/node-exporter
-        exec ${pkgs.python3.withPackages (p: [
-          p.prometheus_client
-        ])}/bin/python ${pkgs.fetchurl {
-          url = "https://raw.githubusercontent.com/jangrewe/prometheus-fail2ban-exporter/11066950b47bb2dbef96ea8544f76e46ed829e81/fail2ban-exporter.py";
-          sha256 = "049lsvw1nj65bbvp8ygyz3743ayzdawrbjixaxmpm03qbrcfmwc4";
-        }}
-      '';
-    };
-
-    path = with pkgs; [ fail2ban ];
-  };
-
-  systemd.timers."prometheus-fail2ban-exporter" = {
-    wantedBy = [ "multi-user.target" ];
-    timerConfig.OnCalendar = "minutely";
-  };
-
   virtualisation.docker.enable = true;
 
   services.buildkite-agents = listToAttrs (map (n: rec {