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 = ''
32 tcp dport ${toString public-inbox.nntp.port} counter accept comment "public-inbox: NNTPS"
33 tcp dport 1993 counter accept comment "public-inbox: IMAPS"
39 fileSystems."/var/lib/public-inbox" = {
40 device = "rpool/var/public-inbox";
44 public-inbox-httpd = {
45 confinement.enable = true;
47 SupplementaryGroups = [ groups."git-daemon".name ];
48 #BindReadOnlyPaths = [ "/var/lib/acme/${domain}" ];
51 public-inbox-imapd = {
52 confinement.enable = true;
53 wants = [ "acme-selfsigned-${domain}.service" "acme-${domain}.service" ];
54 after = [ "acme-selfsigned-${domain}.service" ];
56 SupplementaryGroups = [ groups."acme".name ];
57 BindReadOnlyPaths = [ "/var/lib/acme/${domain}" ];
61 confinement.enable = true;
63 public-inbox-nntpd = {
64 confinement.enable = true;
65 wants = [ "acme-selfsigned-${domain}.service" "acme-${domain}.service" ];
66 after = [ "acme-selfsigned-${domain}.service" ];
68 SupplementaryGroups = [ groups."acme".name ];
69 BindReadOnlyPaths = [ "/var/lib/acme/${domain}" ];
73 services.public-inbox = {
75 postfix.enable = true;
76 settings.publicinbox = {
77 css = [ "href=https://mails.${domain}/style/light.css" ];
78 nntpserver = [ "nntps://news.${domain}" ];
79 wwwlisting = "match=domain";
80 #imapserver = [ "mails.${domain}" ];
84 args = [ "--no-precheck" ]; # Allow Bcc:
88 port = "/run/public-inbox-http.sock";
92 "https://mails.${domain}/inbox"
93 "https://public-inbox.${domain}/inbox"
100 cert = "/var/lib/acme/${domain}/fullchain.pem";
101 key = "/var/lib/acme/${domain}/key.pem";
105 # FIXME: find an IP or .onion to put 993
107 args = [ "-W0" "--listen" "imaps://0.0.0.0:1993" ];
109 cert = "/var/lib/acme/${domain}/fullchain.pem";
110 key = "/var/lib/acme/${domain}/key.pem";
119 annonces d'informations concernant importantes
121 url = "https://mails.${domain}/inbox/news";
122 newsgroup = "inbox.comp.${orga}.news";
123 #coderepo = [ "sourcephile-txt" ];
131 discussions concernant l'informatique en général.
133 url = "https://mails.${domain}/inbox/chat";
134 newsgroup = "inbox.comp.${orga}.chat";
142 discussions avec le grand public.
144 url = "https://mails.${domain}/inbox/contact";
145 newsgroup = "inbox.comp.${orga}.contact";
146 #coderepo = [ "${orga}" ];
150 "environnement@${domain}"
153 environnement@${domain} :
154 discussions sur les impacts environnementaux de l'informatique.
156 url = "https://mails.${domain}/inbox/environnement";
157 newsgroup = "inbox.comp.${orga}.environnement";
158 #coderepo = [ "sourcephile-txt" ];
166 discussions concernant la science de l'informatique.
168 url = "https://mails.${domain}/inbox/labo";
169 newsgroup = "inbox.comp.${orga}.labo";
170 # TODO: list many source code repositories
171 #coderepo = [ "sourcephile-txt" ];
179 discussions concernant l'administration technique de l'infrastructure informatique.
181 url = "https://mails.${domain}/inbox/prod";
182 newsgroup = "inbox.comp.${orga}.prod";
183 #coderepo = [ "sourcephile-txt" "sourcephile-nix" ];
191 discussions à l'attention de l'ensemble des personnes à bord.
193 url = "https://mails.${domain}/inbox/orga";
194 newsgroup = "inbox.comp.${orga}.orga";
195 #coderepo = [ "sourcephile-txt" ];
203 une cible de test pour effectuer des tirs de mails.
205 url = "https://mails.${domain}/inbox/test";
206 newsgroup = "inbox.comp.${orga}.test";
207 hide = [ /* FIXME: doesn't work for IMAP */ "imap" "www" "manifest" ];
209 } // lib.genAttrs (map baseNameOf repositories) (name: {
215 discussions about ${name}.
217 url = "https://mails.${domain}/inbox/${name}";
218 newsgroup = "inbox.comp.${orga}.${name}";
221 settings.coderepo = {
223 dir = "/var/lib/gitolite/repositories/sourcephile-txt.git";
224 cgitUrl = "https://code.${domain}/sourcephile-txt.git";
227 dir = "/var/lib/gitolite/repositories/sourcephile-nix.git";
228 cgitUrl = "https://code.${domain}/sourcephile-nix.git";
230 } // lib.listToAttrs (map
231 (path: lib.nameValuePair (baseNameOf path) {
232 dir = "/var/lib/gitolite/repositories/${path}.git";
233 cgitUrl = "https://code.${domain}/${path}.git";
237 services.sanoid.datasets."rpool/var/public-inbox" = {
238 use_template = [ "snap" ];