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*/ ];
31 #mda.args = [ "--no-precheck" ];
33 watch.spamCheck = null;
36 "https://mails.${domain}/inbox"
37 "https://public-inbox.${domain}/inbox"
39 wwwListing = "match=domain";
40 config.publicinbox = {
41 css = [ "href=https://mails.${domain}/style/light.css" ];
44 nntpServer = [ "nntps://news.${domain}" ];
45 nntp.cert = "/var/lib/acme/${domain}/fullchain.pem";
46 nntp.key = "/var/lib/acme/${domain}/key.pem";
47 imap.listenStreams = [ "0.0.0.0:1993" ];
48 imap.cert = "/var/lib/acme/${domain}/fullchain.pem";
49 imap.key = "/var/lib/acme/${domain}/key.pem";
55 "public-inbox+atelier@${domain}"
59 discussions concernant le développement logiciel.
61 url = "https://mails.${domain}/inbox/atelier";
62 newsgroup = "inbox.comp.sourcephile.atelier";
65 # TODO: list many source code repositories
71 "public-inbox+bar@${domain}"
75 discussions concernant l'informatique en général.
77 url = "https://mails.${domain}/inbox/bar";
78 newsgroup = "inbox.comp.sourcephile.bar";
83 "public-inbox+contact@${domain}"
87 discussions avec le grand public.
89 url = "https://mails.${domain}/inbox/contact";
90 newsgroup = "inbox.comp.sourcephile.contact";
91 #config.coderepo = [ "sourcephile" ];
96 "public-inbox+ecole@${domain}"
100 discussions pour s'entraider en informatique.
102 url = "https://mails.${domain}/inbox/ecole";
103 newsgroup = "inbox.comp.sourcephile.ecole";
104 config.coderepo = [ "sourcephile-txt" ];
108 "environnement@${domain}"
109 "public-inbox+environnement@${domain}"
112 environnement@${domain} :
113 discussions sur les impacts environnementaux de l'informatique.
115 url = "https://mails.${domain}/inbox/environnement";
116 newsgroup = "inbox.comp.sourcephile.environnement";
117 config.coderepo = [ "sourcephile-txt" ];
122 "public-inbox+labo@${domain}"
126 discussions concernant la science de l'informatique.
128 url = "https://mails.${domain}/inbox/labo";
129 newsgroup = "inbox.comp.sourcephile.labo";
132 # TODO: list many source code repositories
138 "public-inbox+machines@${domain}"
142 discussions concernant l'administration technique de l'infrastructure informatique.
144 url = "https://mails.${domain}/inbox/machines";
145 newsgroup = "inbox.comp.sourcephile.machines";
146 config.coderepo = [ "sourcephile-txt" "sourcephile-nix" ];
151 "public-inbox+pont@${domain}"
155 discussions à l'attention de l'ensemble des personnes à bord.
157 url = "https://mails.${domain}/inbox/pont";
158 newsgroup = "inbox.comp.sourcephile.pont";
159 config.coderepo = [ "sourcephile-txt" ];
164 "public-inbox+test@${domain}"
168 une cible de test pour effectuer des tirs de mails.
170 url = "https://mails.${domain}/inbox/test";
171 newsgroup = "inbox.comp.sourcephile.test";
173 hide = [ "www" "manifest" ];
180 dir = "/var/lib/gitolite/repositories/sourcephile-txt.git";
181 cgitUrl = "https://code.${domain}/sourcephile-txt.git";
184 dir = "/var/lib/gitolite/repositories/sourcephile-nix.git";
185 cgitUrl = "https://code.${domain}/sourcephile-nix.git";