1 { pkgs, lib, config, ... }:
2 let inherit (config.users) groups;
3 domain = "sourcephile.fr";
6 security.acme.certs."${domain}" = {
7 postRun = "systemctl try-restart public-inbox-nntpd public-inbox-imapd";
9 networking.nftables.ruleset = ''
10 add rule inet filter net2fw tcp dport 563 counter accept comment "NNTPS"
11 add rule inet filter net2fw tcp dport 1993 counter accept comment "IMAPS"
14 public-inbox-httpd = {
15 serviceConfig.SupplementaryGroups = [ groups."git-daemon".name ];
17 public-inbox-imapd = {
18 wants = [ "acme-selfsigned-${domain}.service" "acme-${domain}.service"];
19 after = [ "acme-selfsigned-${domain}.service" ];
20 serviceConfig.SupplementaryGroups = [ groups."acme".name ];
22 public-inbox-nntpd = {
23 wants = [ "acme-selfsigned-${domain}.service" "acme-${domain}.service"];
24 after = [ "acme-selfsigned-${domain}.service" ];
25 serviceConfig.SupplementaryGroups = [ groups."acme".name ];
28 services.public-inbox = {
30 path = with pkgs; [ /*spamassassin*/ ];
32 "https://mails.${domain}/inbox"
33 "https://public-inbox.${domain}/inbox"
35 settings.publicinbox = {
36 css = [ "href=https://mails.${domain}/style/light.css" ];
37 nntpserver = [ "nntps://news.${domain}" ];
38 wwwlisting = "match=domain";
40 #mda.args = [ "--no-precheck" ];
41 settings.publicinboxmda.spamcheck = "none";
42 settings.publicinboxwatch.spamcheck = "none";
43 nntp.cert = "/var/lib/acme/${domain}/fullchain.pem";
44 nntp.key = "/var/lib/acme/${domain}/key.pem";
45 imap.listenStreams = [ "0.0.0.0:1993" ];
46 imap.cert = "/var/lib/acme/${domain}/fullchain.pem";
47 imap.key = "/var/lib/acme/${domain}/key.pem";
52 "public-inbox+atelier@${domain}"
54 url = "https://mails.${domain}/inbox/atelier";
57 discussions concernant le développement logiciel.
59 newsgroup = "inbox.comp.sourcephile.atelier";
62 # TODO: list many source code repositories
69 "public-inbox+bar@${domain}"
73 discussions concernant l'informatique en général.
75 url = "https://mails.${domain}/inbox/bar";
76 newsgroup = "inbox.comp.sourcephile.bar";
81 "public-inbox+contact@${domain}"
85 discussions avec le grand public.
87 url = "https://mails.${domain}/inbox/contact";
88 newsgroup = "inbox.comp.sourcephile.contact";
89 #coderepo = [ "sourcephile" ];
94 "public-inbox+ecole@${domain}"
98 discussions pour s'entraider en informatique.
100 url = "https://mails.${domain}/inbox/ecole";
101 newsgroup = "inbox.comp.sourcephile.ecole";
102 coderepo = [ "sourcephile-txt" ];
106 "environnement@${domain}"
107 "public-inbox+environnement@${domain}"
110 environnement@${domain} :
111 discussions sur les impacts environnementaux de l'informatique.
113 url = "https://mails.${domain}/inbox/environnement";
114 newsgroup = "inbox.comp.sourcephile.environnement";
115 coderepo = [ "sourcephile-txt" ];
120 "public-inbox+labo@${domain}"
124 discussions concernant la science de l'informatique.
126 url = "https://mails.${domain}/inbox/labo";
127 newsgroup = "inbox.comp.sourcephile.labo";
130 # TODO: list many source code repositories
136 "public-inbox+machines@${domain}"
140 discussions concernant l'administration technique de l'infrastructure informatique.
142 url = "https://mails.${domain}/inbox/machines";
143 newsgroup = "inbox.comp.sourcephile.machines";
144 coderepo = [ "sourcephile-txt" "sourcephile-nix" ];
149 "public-inbox+pont@${domain}"
153 discussions à l'attention de l'ensemble des personnes à bord.
155 url = "https://mails.${domain}/inbox/pont";
156 newsgroup = "inbox.comp.sourcephile.pont";
157 coderepo = [ "sourcephile-txt" ];
162 "public-inbox+test@${domain}"
166 une cible de test pour effectuer des tirs de mails.
168 url = "https://mails.${domain}/inbox/test";
169 newsgroup = "inbox.comp.sourcephile.test";
170 hide = [ "www" "manifest" ];
173 settings.coderepo = {
175 dir = "/var/lib/gitolite/repositories/sourcephile-txt.git";
176 cgitUrl = "https://code.${domain}/sourcephile-txt.git";
179 dir = "/var/lib/gitolite/repositories/sourcephile-nix.git";
180 cgitUrl = "https://code.${domain}/sourcephile-nix.git";