]> Git — Sourcephile - sourcephile-nix.git/blob - servers/mermet/public-inbox.nix
public-inbox: fix CSS and environment
[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 "https://${domain}/mails/archives"
19 ];
20 wwwListing = "match=domain";
21 config.publicinbox = {
22 css = [ "href=https://public-inbox.${domain}/style/light.css" ];
23 };
24
25 nntpServer = [ "nntps://news.${domain}" ];
26 nntp.cert = "/var/lib/acme/${domain}/fullchain.pem";
27 nntp.key = "/var/lib/acme/${domain}/key.pem";
28 nntp.extraGroups = [ groups.acme.name ];
29
30 inboxes = {
31 bistrot = {
32 address = [
33 "bistrot@${domain}"
34 "public-inbox+bistrot@${domain}"
35 ];
36 description = ''
37 Discussions publiques sans sujet particulier,
38 simplement pour la camaraderie à bord de Sourcephile.
39 '';
40 url = "https://${domain}/mails/archives/bistrot";
41 newsgroup = "inbox.comp.sourcephile.bistrot";
42 };
43 entraide = {
44 address = [
45 "entraide@${domain}"
46 "public-inbox+entraide@${domain}"
47 ];
48 description = ''
49 Discussions publiques pour l'entraide à bord de Sourcephile.
50 '';
51 url = "https://public-inbox.${domain}/archives/entraide";
52 newsgroup = "inbox.comp.sourcephile.entraide";
53 };
54 environnement = {
55 address = [
56 "environnement@${domain}"
57 "public-inbox+environnement@${domain}"
58 ];
59 description = ''
60 Discussions publiques pour se soucier de l'environnement
61 des activités de Sourcephile.
62 '';
63 url = "https://public-inbox.${domain}/archives/environnement";
64 newsgroup = "inbox.comp.sourcephile.environnement";
65 };
66 infra = {
67 address = [
68 "infra@${domain}"
69 "public-inbox+infra@${domain}"
70 ];
71 description = ''
72 Discussions publiques à propos de l'infrastructure,
73 notamment informatique, de Sourcephile.
74 '';
75 url = "https://public-inbox.${domain}/archives/infra";
76 newsgroup = "inbox.comp.sourcephile.infra";
77 };
78 labo = {
79 address = [
80 "labo@${domain}"
81 "public-inbox+labo@${domain}"
82 ];
83 description = ''
84 Discussions publiques concernant les recherches scientifiques
85 et développements informatiques de Sourcephile.
86 '';
87 url = "https://public-inbox.${domain}/archives/labo";
88 newsgroup = "inbox.comp.sourcephile.labo";
89 };
90 membres = {
91 address = [
92 "membres@${domain}"
93 "public-inbox+membres@${domain}"
94 ];
95 description = ''
96 Discussions ou annonces publiques à l'attention
97 de l'ensemble des personnes à bord de Sourcephile.
98 '';
99 url = "https://public-inbox.${domain}/archives/membres";
100 newsgroup = "inbox.comp.sourcephile.membres";
101 #config.coderepo = [ "sourcephile" ];
102 };
103 };
104
105 /*
106 config.coderepo.sourcephile-nix = {
107 dir = "/var/lib/git/repositories/sourcephile.git";
108 cgitUrl = "https://${domain}/git/sourcephile";
109 };
110 */
111 };
112 security.acme.certs."${domain}" = {
113 postRun = "systemctl reload public-inbox-nntp";
114 };
115 systemd.services.public-inbox = {
116 wants = [ "acme-selfsigned-${domain}.service" "acme-${domain}.service"];
117 after = [ "acme-selfsigned-${domain}.service" ];
118 };
119 }