1 { pkgs, lib, config, ... }:
2 let inherit (config.services) public-inbox;
3 inherit (config.users) groups;
4 domain = "sourcephile.fr";
6 # Pour supprimer un message :
7 # curl https://mails.sourcephile.fr/inbox/environnement/8ea699887ca47797b4460053588cbef2d115829ab4@vieber.ru/raw |
8 # sudo -u public-inbox public-inbox-learn rm
10 security.acme.certs."${domain}" = {
11 postRun = "systemctl try-restart public-inbox-nntpd public-inbox-imapd";
13 networking.nftables.ruleset = ''
14 add rule inet filter net2fw tcp dport ${toString public-inbox.nntp.port} counter accept comment "NNTPS"
15 add rule inet filter net2fw tcp dport 1993 counter accept comment "IMAPS"
18 public-inbox-httpd = {
20 SupplementaryGroups = [ groups."git-daemon".name ];
21 BindReadOnlyPaths = [ "/var/lib/acme/${domain}" ];
24 public-inbox-imapd = {
25 wants = [ "acme-selfsigned-${domain}.service" "acme-${domain}.service"];
26 after = [ "acme-selfsigned-${domain}.service" ];
28 SupplementaryGroups = [ groups."acme".name ];
29 BindReadOnlyPaths = [ "/var/lib/acme/${domain}" ];
30 RestrictAddressFamilies = [ "AF_INET" ]; # For custom --listen
33 public-inbox-nntpd = {
34 wants = [ "acme-selfsigned-${domain}.service" "acme-${domain}.service"];
35 after = [ "acme-selfsigned-${domain}.service" ];
37 SupplementaryGroups = [ groups."acme".name ];
38 BindReadOnlyPaths = [ "/var/lib/acme/${domain}" ];
42 services.public-inbox = {
44 settings.publicinbox = {
45 css = [ "href=https://mails.${domain}/style/light.css" ];
46 nntpserver = [ "nntps://news.${domain}" ];
47 wwwlisting = "match=domain";
51 args = [ "--no-precheck" ]; # Allow Bcc:
55 port = "/run/publix-inbox-http.sock";
58 "https://mails.${domain}/inbox"
59 "https://public-inbox.${domain}/inbox"
65 cert = "/var/lib/acme/${domain}/fullchain.pem";
66 key = "/var/lib/acme/${domain}/key.pem";
69 args = [ "--listen" "imaps://0.0.0.0:1993/?cert=/var/lib/acme/${domain}/fullchain.pem,key=/var/lib/acme/${domain}/key.pem" ];
71 # FIXME: find an IP or .onion to put 993
73 #cert = "/var/lib/acme/${domain}/fullchain.pem";
74 #key = "/var/lib/acme/${domain}/key.pem";
80 "public-inbox+news@${domain}"
84 annonces d'informations concernant importantes
86 url = "https://mails.${domain}/inbox/news";
87 newsgroup = "inbox.comp.sourcephile.news";
88 coderepo = [ "sourcephile-txt" ];
93 "public-inbox+chat@${domain}"
97 discussions concernant l'informatique en général.
99 url = "https://mails.${domain}/inbox/chat";
100 newsgroup = "inbox.comp.sourcephile.chat";
105 "public-inbox+contact@${domain}"
109 discussions avec le grand public.
111 url = "https://mails.${domain}/inbox/contact";
112 newsgroup = "inbox.comp.sourcephile.contact";
113 #coderepo = [ "sourcephile" ];
117 "environnement@${domain}"
118 "public-inbox+environnement@${domain}"
121 environnement@${domain} :
122 discussions sur les impacts environnementaux de l'informatique.
124 url = "https://mails.${domain}/inbox/environnement";
125 newsgroup = "inbox.comp.sourcephile.environnement";
126 coderepo = [ "sourcephile-txt" ];
131 "public-inbox+labo@${domain}"
135 discussions concernant la science de l'informatique.
137 url = "https://mails.${domain}/inbox/labo";
138 newsgroup = "inbox.comp.sourcephile.labo";
141 # TODO: list many source code repositories
147 "public-inbox+prod@${domain}"
151 discussions concernant l'administration technique de l'infrastructure informatique.
153 url = "https://mails.${domain}/inbox/prod";
154 newsgroup = "inbox.comp.sourcephile.prod";
155 coderepo = [ "sourcephile-txt" "sourcephile-nix" ];
160 "public-inbox+orga@${domain}"
164 discussions à l'attention de l'ensemble des personnes à bord.
166 url = "https://mails.${domain}/inbox/orga";
167 newsgroup = "inbox.comp.sourcephile.orga";
168 coderepo = [ "sourcephile-txt" ];
173 "public-inbox+test@${domain}"
177 une cible de test pour effectuer des tirs de mails.
179 url = "https://mails.${domain}/inbox/test";
180 newsgroup = "inbox.comp.sourcephile.test";
181 hide = [ "www" "manifest" ];
184 settings.coderepo = {
186 dir = "/var/lib/gitolite/repositories/sourcephile-txt.git";
187 cgitUrl = "https://code.${domain}/sourcephile-txt.git";
190 dir = "/var/lib/gitolite/repositories/sourcephile-nix.git";
191 cgitUrl = "https://code.${domain}/sourcephile-nix.git";