1 { pkgs, lib, config, ... }:
2 let inherit (config.services) public-inbox;
3 inherit (config.users) groups;
7 # Pour supprimer un message :
8 # curl https://mails.sourcephile.fr/inbox/environnement/8ea699887ca47797b4460053588cbef2d115829ab4@vieber.ru/raw |
9 # sudo -u public-inbox public-inbox-learn rm
11 security.acme.certs."${domain}" = {
12 postRun = "systemctl try-restart public-inbox-nntpd public-inbox-imapd";
14 networking.nftables.ruleset = ''
15 add rule inet filter net2fw tcp dport ${toString public-inbox.nntp.port} counter accept comment "NNTPS"
16 add rule inet filter net2fw tcp dport 1993 counter accept comment "IMAPS"
18 fileSystems."/var/lib/public-inbox" = {
19 device = "rpool/var/public-inbox";
23 public-inbox-httpd = {
25 SupplementaryGroups = [ groups."git-daemon".name ];
26 BindReadOnlyPaths = [ "/var/lib/acme/${domain}" ];
29 public-inbox-imapd = {
30 wants = [ "acme-selfsigned-${domain}.service" "acme-${domain}.service"];
31 after = [ "acme-selfsigned-${domain}.service" ];
33 SupplementaryGroups = [ groups."acme".name ];
34 BindReadOnlyPaths = [ "/var/lib/acme/${domain}" ];
37 public-inbox-nntpd = {
38 wants = [ "acme-selfsigned-${domain}.service" "acme-${domain}.service"];
39 after = [ "acme-selfsigned-${domain}.service" ];
41 SupplementaryGroups = [ groups."acme".name ];
42 BindReadOnlyPaths = [ "/var/lib/acme/${domain}" ];
49 ${name}@${domain} public-inbox@localhost
51 public-inbox.inboxes.${name} = {
54 "public-inbox+${name}@${domain}"
58 discussions concernant ${name}.
60 url = "https://mails.${domain}/inbox/${name}";
61 newsgroup = "inbox.comp.${orga}.${name}";
64 public-inbox.settings.coderepo.${name} = {
65 dir = "/var/lib/gitolite/repositories/${name}.git";
66 cgitUrl = "https://code.${domain}/${name}.git";
85 settings.publicinbox = {
86 css = [ "href=https://mails.${domain}/style/light.css" ];
87 nntpserver = [ "nntps://news.${domain}" ];
88 wwwlisting = "match=domain";
92 args = [ "--no-precheck" ]; # Allow Bcc:
96 port = "/run/public-inbox-http.sock";
100 "https://mails.${domain}/inbox"
101 "https://public-inbox.${domain}/inbox"
108 cert = "/var/lib/acme/${domain}/fullchain.pem";
109 key = "/var/lib/acme/${domain}/key.pem";
113 # FIXME: find an IP or .onion to put 993
115 args = [ "-W0" "--listen" "imaps://0.0.0.0:1993" ];
117 cert = "/var/lib/acme/${domain}/fullchain.pem";
118 key = "/var/lib/acme/${domain}/key.pem";
124 "public-inbox+news@${domain}"
128 annonces d'informations concernant importantes
130 url = "https://mails.${domain}/inbox/news";
131 newsgroup = "inbox.comp.${orga}.news";
132 #coderepo = [ "sourcephile-txt" ];
137 "public-inbox+chat@${domain}"
141 discussions concernant l'informatique en général.
143 url = "https://mails.${domain}/inbox/chat";
144 newsgroup = "inbox.comp.${orga}.chat";
149 "public-inbox+contact@${domain}"
153 discussions avec le grand public.
155 url = "https://mails.${domain}/inbox/contact";
156 newsgroup = "inbox.comp.${orga}.contact";
157 #coderepo = [ "${orga}" ];
161 "environnement@${domain}"
162 "public-inbox+environnement@${domain}"
165 environnement@${domain} :
166 discussions sur les impacts environnementaux de l'informatique.
168 url = "https://mails.${domain}/inbox/environnement";
169 newsgroup = "inbox.comp.${orga}.environnement";
170 #coderepo = [ "sourcephile-txt" ];
175 "public-inbox+labo@${domain}"
179 discussions concernant la science de l'informatique.
181 url = "https://mails.${domain}/inbox/labo";
182 newsgroup = "inbox.comp.${orga}.labo";
183 # TODO: list many source code repositories
184 #coderepo = [ "sourcephile-txt" ];
189 "public-inbox+prod@${domain}"
193 discussions concernant l'administration technique de l'infrastructure informatique.
195 url = "https://mails.${domain}/inbox/prod";
196 newsgroup = "inbox.comp.${orga}.prod";
197 #coderepo = [ "sourcephile-txt" "sourcephile-nix" ];
202 "public-inbox+orga@${domain}"
206 discussions à l'attention de l'ensemble des personnes à bord.
208 url = "https://mails.${domain}/inbox/orga";
209 newsgroup = "inbox.comp.${orga}.orga";
210 #coderepo = [ "sourcephile-txt" ];
215 "public-inbox+test@${domain}"
219 une cible de test pour effectuer des tirs de mails.
221 url = "https://mails.${domain}/inbox/test";
222 newsgroup = "inbox.comp.${orga}.test";
223 hide = [ /* FIXME: doesn't work for IMAP */"imap" "www" "manifest" ];
226 settings.coderepo = {
228 dir = "/var/lib/gitolite/repositories/sourcephile-txt.git";
229 cgitUrl = "https://code.${domain}/sourcephile-txt.git";
232 dir = "/var/lib/gitolite/repositories/sourcephile-nix.git";
233 cgitUrl = "https://code.${domain}/sourcephile-nix.git";