]> Git — Sourcephile - sourcephile-nix.git/blob - servers/mermet/public-inbox.nix
stig: update to 0.11.0a
[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://mails.${domain}/inbox"
18 "https://public-inbox.${domain}/inbox"
19 ];
20 wwwListing = "match=domain";
21 config.publicinbox = {
22 css = [ "href=https://mails.${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 atelier = {
32 address = [
33 "atelier@${domain}"
34 "public-inbox+atelier@${domain}"
35 ];
36 description = ''
37 atelier@${domain} :
38 discussions concernant le développement logiciel.
39 '';
40 url = "https://mails.${domain}/inbox/atelier";
41 newsgroup = "inbox.comp.sourcephile.atelier";
42 };
43 bar = {
44 address = [
45 "bar@${domain}"
46 "public-inbox+bar@${domain}"
47 ];
48 description = ''
49 bar@${domain} :
50 discussions concernant l'informatique en général.
51 '';
52 url = "https://mails.${domain}/inbox/bar";
53 newsgroup = "inbox.comp.sourcephile.bar";
54 };
55 contact = {
56 address = [
57 "contact@${domain}"
58 "public-inbox+contact@${domain}"
59 ];
60 description = ''
61 contact@${domain} :
62 discussions avec le grand public.
63 '';
64 url = "https://mails.${domain}/inbox/contact";
65 newsgroup = "inbox.comp.sourcephile.contact";
66 #config.coderepo = [ "sourcephile" ];
67 };
68 ecole = {
69 address = [
70 "ecole@${domain}"
71 "public-inbox+ecole@${domain}"
72 ];
73 description = ''
74 ecole@${domain} :
75 discussions pour s'entraider en informatique.
76 '';
77 url = "https://mails.${domain}/inbox/ecole";
78 newsgroup = "inbox.comp.sourcephile.ecole";
79 };
80 environnement = {
81 address = [
82 "environnement@${domain}"
83 "public-inbox+environnement@${domain}"
84 ];
85 description = ''
86 environnement@${domain} :
87 discussions sur les impacts environnementaux de l'informatique.
88 '';
89 url = "https://mails.${domain}/inbox/environnement";
90 newsgroup = "inbox.comp.sourcephile.environnement";
91 };
92 labo = {
93 address = [
94 "labo@${domain}"
95 "public-inbox+labo@${domain}"
96 ];
97 description = ''
98 labo@${domain} :
99 discussions concernant la science de l'informatique.
100 '';
101 url = "https://mails.${domain}/inbox/labo";
102 newsgroup = "inbox.comp.sourcephile.labo";
103 };
104 machines = {
105 address = [
106 "machines@${domain}"
107 "public-inbox+machines@${domain}"
108 ];
109 description = ''
110 machines@${domain} :
111 discussions concernant l'administration technique de l'infrastructure informatique.
112 '';
113 url = "https://mails.${domain}/inbox/machines";
114 newsgroup = "inbox.comp.sourcephile.machines";
115 };
116 pont = {
117 address = [
118 "pont@${domain}"
119 "public-inbox+pont@${domain}"
120 ];
121 description = ''
122 pont@${domain} :
123 discussions à l'attention de l'ensemble des personnes à bord.
124 '';
125 url = "https://mails.${domain}/inbox/pont";
126 newsgroup = "inbox.comp.sourcephile.pont";
127 #config.coderepo = [ "sourcephile" ];
128 };
129 test = {
130 address = [
131 "test@${domain}"
132 "public-inbox+test@${domain}"
133 ];
134 description = ''
135 test@${domain} :
136 une cible de test pour effectuer des tirs de mails.
137 '';
138 url = "https://mails.${domain}/inbox/test";
139 newsgroup = "inbox.comp.sourcephile.test";
140 config = {
141 hide = ["www" "manifest"];
142 };
143 };
144 };
145
146 /*
147 config.coderepo.sourcephile-nix = {
148 dir = "/var/lib/git/repositories/sourcephile.git";
149 cgitUrl = "https://${domain}/git/sourcephile";
150 };
151 */
152 };
153 security.acme.certs."${domain}" = {
154 postRun = "systemctl reload public-inbox-nntp";
155 };
156 systemd.services.public-inbox = {
157 wants = [ "acme-selfsigned-${domain}.service" "acme-${domain}.service"];
158 after = [ "acme-selfsigned-${domain}.service" ];
159 };
160 }