]> Git — Sourcephile - sourcephile-nix.git/blob - servers/mermet/public-inbox.nix
nix: revamp directories to put nixpkgs-overlays in the store
[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 = [ "https://${domain}/lists" ];
17 wwwListing = "match=domain";
18
19 nntpServer = [ "nntps://news.${domain}" ];
20 nntp.cert = "/var/lib/acme/${domain}/fullchain.pem";
21 nntp.key = "/var/lib/acme/${domain}/key.pem";
22 nntp.extraGroups = [ groups.acme.name ];
23
24 inboxes = {
25 equipage = {
26 address = [
27 "public-inbox+equipage@${domain}"
28 "equipage@${domain}"
29 ];
30 description = "Équipage";
31 url = "https://${domain}/lists/equipage";
32 newsgroup = "inbox.comp.sourcephile.equipage";
33 #config.coderepo = [ "sourcephile" ];
34 };
35 };
36
37 /*
38 config.coderepo.sourcephile-nix = {
39 dir = "/var/lib/git/repositories/sourcephile.git";
40 cgitUrl = "https://${domain}/git/sourcephile";
41 };
42 */
43 };
44 security.acme.certs."${domain}" = {
45 postRun = "systemctl reload public-inbox-nntp";
46 };
47 systemd.services.public-inbox = {
48 wants = [ "acme-selfsigned-${domain}.service" "acme-${domain}.service"];
49 after = [ "acme-selfsigned-${domain}.service" ];
50 };
51 }