]> Git — Sourcephile - sourcephile-nix.git/blob - servers/mermet/public-inbox.nix
public-inbox: remove linky inbox and add more generic inboxes
[sourcephile-nix.git] / servers / mermet / public-inbox.nix
1 { pkgs, lib, config, ... }:
2 let inherit (config.users) groups;
3 domain = "sourcephile.fr";
4 in
5 {
6 services.public-inbox = {
7 enable = true;
8 path = with pkgs; [ /*spamassassin*/ ];
9 #mda.args = [ "--no-precheck" ];
10 mda.spamCheck = null;
11 watch.spamCheck = null;
12
13 #config.publicinbox.css =
14 # [ "href=https://${domain}/lists/public-inbox.css" ];
15
16 http.mounts = [
17 "https://public-inbox.${domain}/archives"
18 ];
19 wwwListing = "match=domain";
20
21 nntpServer = [ "nntps://news.${domain}" ];
22 nntp.cert = "/var/lib/acme/${domain}/fullchain.pem";
23 nntp.key = "/var/lib/acme/${domain}/key.pem";
24 nntp.extraGroups = [ groups.acme.name ];
25
26 inboxes = {
27 bistrot = {
28 address = [
29 "public-inbox+bistrot@${domain}"
30 "bistrot@${domain}"
31 ];
32 description = ''
33 Discussions publiques sans sujet particulier,
34 simplement pour la camaraderie à bord de Sourcephile.
35 '';
36 url = "https://${domain}/mails/archives/bistrot";
37 newsgroup = "inbox.comp.sourcephile.bistrot";
38 };
39 entraide = {
40 address = [
41 "public-inbox+entraide@${domain}"
42 "entraide@${domain}"
43 ];
44 description = ''
45 Discussions publiques pour l'entraide à bord de Sourcephile.
46 '';
47 url = "https://public-inbox.${domain}/archives/entraide";
48 newsgroup = "inbox.comp.sourcephile.entraide";
49 };
50 environnement = {
51 address = [
52 "public-inbox+environnement@${domain}"
53 "environnement@${domain}"
54 ];
55 description = ''
56 Discussions publiques pour se soucier de l'environnement
57 des activités de Sourcephile.
58 '';
59 url = "https://public-inbox.${domain}/archives/environnement";
60 newsgroup = "inbox.comp.sourcephile.environnement";
61 };
62 infra = {
63 address = [
64 "public-inbox+infra@${domain}"
65 "infra@${domain}"
66 ];
67 description = ''
68 Discussions publiques à propos de l'infrastructure,
69 notamment informatique, de Sourcephile.
70 '';
71 url = "https://public-inbox.${domain}/archives/infra";
72 newsgroup = "inbox.comp.sourcephile.infra";
73 };
74 labo = {
75 address = [
76 "public-inbox+labo@${domain}"
77 "labo@${domain}"
78 ];
79 description = ''
80 Discussions publiques concernant les recherches scientifiques
81 et développements informatiques de Sourcephile.
82 '';
83 url = "https://public-inbox.${domain}/archives/labo";
84 newsgroup = "inbox.comp.sourcephile.labo";
85 };
86 membres = {
87 address = [
88 "public-inbox+membres@${domain}"
89 "membres@${domain}"
90 ];
91 description = ''
92 Discussions ou annonces publiques à l'attention
93 de l'ensemble des personnes à bord de Sourcephile.
94 '';
95 url = "https://public-inbox.${domain}/archives/membres";
96 newsgroup = "inbox.comp.sourcephile.membres";
97 #config.coderepo = [ "sourcephile" ];
98 };
99 };
100
101 /*
102 config.coderepo.sourcephile-nix = {
103 dir = "/var/lib/git/repositories/sourcephile.git";
104 cgitUrl = "https://${domain}/git/sourcephile";
105 };
106 */
107 };
108 security.acme.certs."${domain}" = {
109 postRun = "systemctl reload public-inbox-nntp";
110 };
111 systemd.services.public-inbox = {
112 wants = [ "acme-selfsigned-${domain}.service" "acme-${domain}.service"];
113 after = [ "acme-selfsigned-${domain}.service" ];
114 };
115 }