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";
77 args = [ "--no-precheck" ]; # Allow Bcc:
81 port = "/run/public-inbox-http.sock";
85 "https://mails.${domain}/inbox"
86 "https://public-inbox.${domain}/inbox"
93 cert = "/var/lib/acme/${domain}/fullchain.pem";
94 key = "/var/lib/acme/${domain}/key.pem";
98 # FIXME: find an IP or .onion to put 993
100 args = [ "-W0" "--listen" "imaps://0.0.0.0:1993" ];
102 cert = "/var/lib/acme/${domain}/fullchain.pem";
103 key = "/var/lib/acme/${domain}/key.pem";
112 annonces d'informations concernant importantes
114 url = "https://mails.${domain}/inbox/news";
115 newsgroup = "inbox.comp.${orga}.news";
116 #coderepo = [ "sourcephile-txt" ];
124 discussions concernant l'informatique en général.
126 url = "https://mails.${domain}/inbox/chat";
127 newsgroup = "inbox.comp.${orga}.chat";
135 discussions avec le grand public.
137 url = "https://mails.${domain}/inbox/contact";
138 newsgroup = "inbox.comp.${orga}.contact";
139 #coderepo = [ "${orga}" ];
143 "environnement@${domain}"
146 environnement@${domain} :
147 discussions sur les impacts environnementaux de l'informatique.
149 url = "https://mails.${domain}/inbox/environnement";
150 newsgroup = "inbox.comp.${orga}.environnement";
151 #coderepo = [ "sourcephile-txt" ];
159 discussions concernant la science de l'informatique.
161 url = "https://mails.${domain}/inbox/labo";
162 newsgroup = "inbox.comp.${orga}.labo";
163 # TODO: list many source code repositories
164 #coderepo = [ "sourcephile-txt" ];
172 discussions concernant l'administration technique de l'infrastructure informatique.
174 url = "https://mails.${domain}/inbox/prod";
175 newsgroup = "inbox.comp.${orga}.prod";
176 #coderepo = [ "sourcephile-txt" "sourcephile-nix" ];
184 discussions à l'attention de l'ensemble des personnes à bord.
186 url = "https://mails.${domain}/inbox/orga";
187 newsgroup = "inbox.comp.${orga}.orga";
188 #coderepo = [ "sourcephile-txt" ];
196 une cible de test pour effectuer des tirs de mails.
198 url = "https://mails.${domain}/inbox/test";
199 newsgroup = "inbox.comp.${orga}.test";
200 hide = [ /* FIXME: doesn't work for IMAP */"imap" "www" "manifest" ];
202 } // lib.genAttrs (map baseNameOf repositories) (name: {
208 discussions about ${name}.
210 url = "https://mails.${domain}/inbox/${name}";
211 newsgroup = "inbox.comp.${orga}.${name}";
214 settings.coderepo = {
216 dir = "/var/lib/gitolite/repositories/sourcephile-txt.git";
217 cgitUrl = "https://code.${domain}/sourcephile-txt.git";
220 dir = "/var/lib/gitolite/repositories/sourcephile-nix.git";
221 cgitUrl = "https://code.${domain}/sourcephile-nix.git";
223 } // lib.listToAttrs (map (path: lib.nameValuePair (baseNameOf path) {
224 dir = "/var/lib/gitolite/repositories/${path}.git";
225 cgitUrl = "https://code.${domain}/${path}.git";
228 services.sanoid.datasets."rpool/var/public-inbox" = {
229 use_template = [ "snap" ];