losurdo: hostapd: improve comments
[sourcephile-nix.git] / hosts / mermet / public-inbox.nix
index c600f7af359d5e960e4720fbc7be0d2bde191250..20625b3fbf1baee3e4358a16d55c071346b9804b 100644 (file)
@@ -4,19 +4,19 @@ let
   inherit (config.users) groups;
   orga = "sourcephile";
   domain = "${orga}.fr";
-  inboxes = [
+  repositories = [
     "doclang"
     "majurity"
     "reloto"
-    "symantic"
-    "symantic-atom"
-    "symantic-base"
-    "symantic-cli"
-    "symantic-compta"
-    "symantic-document"
-    "symantic-http"
-    "symantic-parser"
-    "symantic-xml"
+    "haskell/symantic"
+    "haskell/symantic-atom"
+    "haskell/symantic-base"
+    "haskell/symantic-cli"
+    "haskell/symantic-compta"
+    "haskell/symantic-document"
+    "haskell/symantic-http"
+    "haskell/symantic-parser"
+    "haskell/symantic-xml"
   ];
 in
 # Pour supprimer un message :
@@ -60,6 +60,7 @@ systemd.services = {
 };
 services.public-inbox = {
   enable = true;
+  postfix.enable = true;
   settings.publicinbox = {
     css = [ "href=https://mails.${domain}/style/light.css" ];
     nntpserver = [ "nntps://news.${domain}" ];
@@ -99,7 +100,6 @@ services.public-inbox = {
     news = {
       address = [
         "news@${domain}"
-        "public-inbox+news@${domain}"
       ];
       description = ''
         news@${domain} :
@@ -112,7 +112,6 @@ services.public-inbox = {
     chat = {
       address = [
         "chat@${domain}"
-        "public-inbox+chat@${domain}"
       ];
       description = ''
         chat@${domain} :
@@ -124,7 +123,6 @@ services.public-inbox = {
     contact = {
       address = [
         "contact@${domain}"
-        "public-inbox+contact@${domain}"
       ];
       description = ''
         contact@${domain} :
@@ -137,7 +135,6 @@ services.public-inbox = {
     environnement = {
       address = [
         "environnement@${domain}"
-        "public-inbox+environnement@${domain}"
       ];
       description = ''
         environnement@${domain} :
@@ -150,7 +147,6 @@ services.public-inbox = {
     labo = {
       address = [
         "labo@${domain}"
-        "public-inbox+labo@${domain}"
       ];
       description = ''
         labo@${domain} :
@@ -164,7 +160,6 @@ services.public-inbox = {
     prod = {
       address = [
         "prod@${domain}"
-        "public-inbox+prod@${domain}"
       ];
       description = ''
         prod@${domain} :
@@ -177,7 +172,6 @@ services.public-inbox = {
     orga = {
       address = [
         "orga@${domain}"
-        "public-inbox+orga@${domain}"
       ];
       description = ''
         orga@${domain} :
@@ -190,7 +184,6 @@ services.public-inbox = {
     test = {
       address = [
         "test@${domain}"
-        "public-inbox+test@${domain}"
       ];
       description = ''
         test@${domain} :
@@ -200,19 +193,18 @@ services.public-inbox = {
       newsgroup = "inbox.comp.${orga}.test";
       hide = [ /* FIXME: doesn't work for IMAP */"imap" "www" "manifest" ];
     };
-  } // lib.mapAttrs (name: {
+  } // lib.genAttrs (map baseNameOf repositories) (name: {
     address = [
       "${name}@${domain}"
-      "public-inbox+${name}@${domain}"
     ];
     description = ''
       ${name}@${domain} :
-      discussions concernant ${name}.
+      discussions about ${name}.
     '';
     url = "https://mails.${domain}/inbox/${name}";
     newsgroup = "inbox.comp.${orga}.${name}";
     coderepo = [ name ];
-  }) inboxes;
+  });
   settings.coderepo = {
     sourcephile-txt = {
       dir = "/var/lib/gitolite/repositories/sourcephile-txt.git";
@@ -222,16 +214,13 @@ services.public-inbox = {
       dir = "/var/lib/gitolite/repositories/sourcephile-nix.git";
       cgitUrl = "https://code.${domain}/sourcephile-nix.git";
     };
-  } // lib.mapAttrs (name: {
-    dir = "/var/lib/gitolite/repositories/${name}.git";
-    cgitUrl = "https://code.${domain}/${name}.git";
-  });
+  } // lib.listToAttrs (map (path: lib.nameValuePair (baseNameOf path) {
+    dir = "/var/lib/gitolite/repositories/${path}.git";
+    cgitUrl = "https://code.${domain}/${path}.git";
+  }) repositories);
 };
-services.postfix.virtual = lib.concatMapStringsSep "\n" (name: ''
-  ${name}@${domain} public-inbox@localhost
-'') inboxes;
 services.sanoid.datasets."rpool/var/public-inbox" = {
-  use_template = [ "local" ];
+  use_template = [ "snap" ];
   daily = 7;
 };
 }