summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlan Pearce2024-06-29 17:12:36 +0200
committerAlan Pearce2024-06-29 17:12:36 +0200
commite6bd9a64bbcf404ea71be8485d07d3fee54f2b79 (patch)
treee115537613bf2231737af94a80aa948846695846
parent9dfbbb14469ade2b52fd41a1b88ee2c08ef0cdaa (diff)
downloadnixfiles-e6bd9a64bbcf404ea71be8485d07d3fee54f2b79.tar.lz
nixfiles-e6bd9a64bbcf404ea71be8485d07d3fee54f2b79.tar.zst
nixfiles-e6bd9a64bbcf404ea71be8485d07d3fee54f2b79.zip
linde: enable mailing from goatcounter
-rw-r--r--system/linde.nix21
1 files changed, 21 insertions, 0 deletions
diff --git a/system/linde.nix b/system/linde.nix
index 7b3e944a..c9da9e65 100644
--- a/system/linde.nix
+++ b/system/linde.nix
@@ -15,6 +15,7 @@ let
   net-rdnsip = "2a01:4f8:c012:23a4::53";
   net-mask6 = "64";
   net-gw6 = "fe80::1";
+  domain = "alanpearce.eu";
   ts-domain = "hydra-pinecone.ts.net";
   golink = (builtins.getFlake (toString <golink>)).nixosModules.default;
 in
@@ -156,6 +157,7 @@ in
 
   networking = {
     hostName = hostname;
+    inherit domain;
     useDHCP = false;
     dhcpcd.enable = false;
     nameservers = [
@@ -354,6 +356,7 @@ in
       tls = "proxy";
       websocket = true;
       automigrate = true;
+      smtp = "smtp://localhost:25";
     };
   };
 
@@ -458,6 +461,24 @@ in
     };
   };
 
+  services.postfix =
+    let
+      localUser = "alan";
+      forwardingAddress = "alan@alanpearce.eu";
+    in
+    {
+      enable = true;
+      destination = [ ];
+      domain = config.networking.domain;
+      virtual = ''
+        @${config.networking.hostName}.${config.networking.domain} ${localUser}
+        ${localUser} ${forwardingAddress}
+      '';
+      config = {
+        inet_interfaces = "loopback-only";
+      };
+    };
+
   services.kresd = {
     enable = true;
     # package = pkgs.knot-resolver.override { extraFeatures = true; };