1 { pkgs, lib, config, ... }:
3 inherit (config.services) public-inbox;
4 inherit (config.users) groups;
12 "haskell/symantic-atom"
13 "haskell/symantic-base"
14 "haskell/symantic-cli"
15 "haskell/symantic-compta"
16 "haskell/symantic-document"
17 "haskell/symantic-http"
18 "haskell/symantic-parser"
19 "haskell/symantic-xml"
22 # Pour supprimer un message :
23 # curl https://mails.sourcephile.fr/inbox/environnement/8ea699887ca47797b4460053588cbef2d115829ab4@vieber.ru/raw |
24 # sudo -u public-inbox public-inbox-learn rm
26 security.acme.certs."${domain}" = {
27 postRun = "systemctl try-restart public-inbox-nntpd public-inbox-imapd";
29 networking.nftables.ruleset = ''
30 add rule inet filter net2fw tcp dport ${toString public-inbox.nntp.port} counter accept comment "NNTPS"
31 add rule inet filter net2fw tcp dport 1993 counter accept comment "IMAPS"
33 fileSystems."/var/lib/public-inbox" = {
34 device = "rpool/var/public-inbox";
38 public-inbox-httpd = {
39 confinement.enable = true;
41 SupplementaryGroups = [ groups."git-daemon".name ];
42 #BindReadOnlyPaths = [ "/var/lib/acme/${domain}" ];
45 public-inbox-imapd = {
46 confinement.enable = true;
47 wants = [ "acme-selfsigned-${domain}.service" "acme-${domain}.service"];
48 after = [ "acme-selfsigned-${domain}.service" ];
50 SupplementaryGroups = [ groups."acme".name ];
51 BindReadOnlyPaths = [ "/var/lib/acme/${domain}" ];
55 confinement.enable = true;
57 public-inbox-nntpd = {
58 confinement.enable = true;
59 wants = [ "acme-selfsigned-${domain}.service" "acme-${domain}.service"];
60 after = [ "acme-selfsigned-${domain}.service" ];
62 SupplementaryGroups = [ groups."acme".name ];
63 BindReadOnlyPaths = [ "/var/lib/acme/${domain}" ];
67 services.public-inbox = {
69 postfix.enable = true;
70 settings.publicinbox = {
71 css = [ "href=https://mails.${domain}/style/light.css" ];
72 nntpserver = [ "nntps://news.${domain}" ];
73 wwwlisting = "match=domain";
74 #imapserver = [ "mails.${domain}" ];
78 args = [ "--no-precheck" ]; # Allow Bcc:
82 port = "/run/public-inbox-http.sock";
86 "https://mails.${domain}/inbox"
87 "https://public-inbox.${domain}/inbox"
94 cert = "/var/lib/acme/${domain}/fullchain.pem";
95 key = "/var/lib/acme/${domain}/key.pem";
99 # FIXME: find an IP or .onion to put 993
101 args = [ "-W0" "--listen" "imaps://0.0.0.0:1993" ];
103 cert = "/var/lib/acme/${domain}/fullchain.pem";
104 key = "/var/lib/acme/${domain}/key.pem";
113 annonces d'informations concernant importantes
115 url = "https://mails.${domain}/inbox/news";
116 newsgroup = "inbox.comp.${orga}.news";
117 #coderepo = [ "sourcephile-txt" ];
125 discussions concernant l'informatique en général.
127 url = "https://mails.${domain}/inbox/chat";
128 newsgroup = "inbox.comp.${orga}.chat";
136 discussions avec le grand public.
138 url = "https://mails.${domain}/inbox/contact";
139 newsgroup = "inbox.comp.${orga}.contact";
140 #coderepo = [ "${orga}" ];
144 "environnement@${domain}"
147 environnement@${domain} :
148 discussions sur les impacts environnementaux de l'informatique.
150 url = "https://mails.${domain}/inbox/environnement";
151 newsgroup = "inbox.comp.${orga}.environnement";
152 #coderepo = [ "sourcephile-txt" ];
160 discussions concernant la science de l'informatique.
162 url = "https://mails.${domain}/inbox/labo";
163 newsgroup = "inbox.comp.${orga}.labo";
164 # TODO: list many source code repositories
165 #coderepo = [ "sourcephile-txt" ];
173 discussions concernant l'administration technique de l'infrastructure informatique.
175 url = "https://mails.${domain}/inbox/prod";
176 newsgroup = "inbox.comp.${orga}.prod";
177 #coderepo = [ "sourcephile-txt" "sourcephile-nix" ];
185 discussions à l'attention de l'ensemble des personnes à bord.
187 url = "https://mails.${domain}/inbox/orga";
188 newsgroup = "inbox.comp.${orga}.orga";
189 #coderepo = [ "sourcephile-txt" ];
197 une cible de test pour effectuer des tirs de mails.
199 url = "https://mails.${domain}/inbox/test";
200 newsgroup = "inbox.comp.${orga}.test";
201 hide = [ /* FIXME: doesn't work for IMAP */"imap" "www" "manifest" ];
203 } // lib.genAttrs (map baseNameOf repositories) (name: {
209 discussions about ${name}.
211 url = "https://mails.${domain}/inbox/${name}";
212 newsgroup = "inbox.comp.${orga}.${name}";
215 settings.coderepo = {
217 dir = "/var/lib/gitolite/repositories/sourcephile-txt.git";
218 cgitUrl = "https://code.${domain}/sourcephile-txt.git";
221 dir = "/var/lib/gitolite/repositories/sourcephile-nix.git";
222 cgitUrl = "https://code.${domain}/sourcephile-nix.git";
224 } // lib.listToAttrs (map (path: lib.nameValuePair (baseNameOf path) {
225 dir = "/var/lib/gitolite/repositories/${path}.git";
226 cgitUrl = "https://code.${domain}/${path}.git";
229 services.sanoid.datasets."rpool/var/public-inbox" = {
230 use_template = [ "snap" ];