about summary refs log tree commit diff
path: root/configurations/manwe
diff options
context:
space:
mode:
authorazahi <azat@bahawi.net>2025-03-12 20:17:13 +0300
committerazahi <azat@bahawi.net>2025-03-12 20:17:13 +0300
commitc81dc5a13b469c511fac6fa2390b70422d1b4da5 (patch)
tree4dab5909006ab5c25da6bd9fde6a714c7719ded7 /configurations/manwe
parent2025-02-17 (diff)
2025-03-12 HEAD master
Diffstat (limited to 'configurations/manwe')
-rw-r--r--configurations/manwe/default.nix3
-rw-r--r--configurations/manwe/mailserver/default.nix21
2 files changed, 18 insertions, 6 deletions
diff --git a/configurations/manwe/default.nix b/configurations/manwe/default.nix
index 326cfa6..d750aa3 100644
--- a/configurations/manwe/default.nix
+++ b/configurations/manwe/default.nix
@@ -6,9 +6,6 @@
 {
   imports = lib.modulesIn ./. |> lib.attrValues;
 
-  # Something is broken there. Not sure why it affects me tho.
-  disabledModules = [ "services/networking/wireguard-networkd.nix" ];
-
   nixfiles.modules = {
     wireguard.server.enable = true;
 
diff --git a/configurations/manwe/mailserver/default.nix b/configurations/manwe/mailserver/default.nix
index 5160604..a02e8ad 100644
--- a/configurations/manwe/mailserver/default.nix
+++ b/configurations/manwe/mailserver/default.nix
@@ -98,13 +98,28 @@
       };
     };
 
-    # https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/issues/275#note_1746383655
-    dovecot2.sieve.extensions = [ "fileinto" ];
-
     # https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/issues/241
     redis.servers.rspamd.enable = lib.mkForce false;
+
+    prometheus.exporters.postfix = {
+      enable = true;
+      listenAddress = "127.0.0.1";
+      port = 9154;
+    };
   };
 
+  environment.etc."alloy/postfix.alloy".text = with config.services.prometheus.exporters.postfix; ''
+    prometheus.scrape "postfix" {
+      targets = [
+        {
+          __address__ = "${listenAddress}:${toString port}",
+          instance    = "${config.networking.hostName}",
+        },
+      ]
+      forward_to = [prometheus.relabel.default.receiver]
+    }
+  '';
+
   systemd.services.rspamd = {
     requires = lib.mkForce [ "redis-default.service" ];
     after = lib.mkForce [ "redis-default.service" ];

Consider giving Nix/NixOS a try! <3