{ pkgs, lib, config, ... }: let inherit (config.users) groups; domain = "sourcephile.fr"; in { services.public-inbox = { enable = true; path = with pkgs; [ /*spamassassin*/ ]; #mda.args = [ "--no-precheck" ]; mda.spamCheck = null; watch.spamCheck = null; #config.publicinbox.css = # [ "href=https://${domain}/lists/public-inbox.css" ]; http.mounts = [ "https://mails.${domain}/inbox" "https://public-inbox.${domain}/inbox" ]; wwwListing = "match=domain"; config.publicinbox = { css = [ "href=https://mails.${domain}/style/light.css" ]; }; nntpServer = [ "nntps://news.${domain}" ]; nntp.cert = "/var/lib/acme/${domain}/fullchain.pem"; nntp.key = "/var/lib/acme/${domain}/key.pem"; nntp.extraGroups = [ groups.acme.name ]; inboxes = { atelier = { address = [ "atelier@${domain}" "public-inbox+atelier@${domain}" ]; description = '' atelier@${domain} : discussions concernant le développement logiciel. ''; url = "https://mails.${domain}/inbox/atelier"; newsgroup = "inbox.comp.sourcephile.atelier"; }; bar = { address = [ "bar@${domain}" "public-inbox+bar@${domain}" ]; description = '' bar@${domain} : discussions concernant l'informatique en général. ''; url = "https://mails.${domain}/inbox/bar"; newsgroup = "inbox.comp.sourcephile.bar"; }; contact = { address = [ "contact@${domain}" "public-inbox+contact@${domain}" ]; description = '' contact@${domain} : discussions avec le grand public. ''; url = "https://mails.${domain}/inbox/contact"; newsgroup = "inbox.comp.sourcephile.contact"; #config.coderepo = [ "sourcephile" ]; }; ecole = { address = [ "ecole@${domain}" "public-inbox+ecole@${domain}" ]; description = '' ecole@${domain} : discussions pour s'entraider en informatique. ''; url = "https://mails.${domain}/inbox/ecole"; newsgroup = "inbox.comp.sourcephile.ecole"; }; environnement = { address = [ "environnement@${domain}" "public-inbox+environnement@${domain}" ]; description = '' environnement@${domain} : discussions sur les impacts environnementaux de l'informatique. ''; url = "https://mails.${domain}/inbox/environnement"; newsgroup = "inbox.comp.sourcephile.environnement"; }; labo = { address = [ "labo@${domain}" "public-inbox+labo@${domain}" ]; description = '' labo@${domain} : discussions concernant la science de l'informatique. ''; url = "https://mails.${domain}/inbox/labo"; newsgroup = "inbox.comp.sourcephile.labo"; }; machines = { address = [ "machines@${domain}" "public-inbox+machines@${domain}" ]; description = '' machines@${domain} : discussions concernant l'administration technique de l'infrastructure informatique. ''; url = "https://mails.${domain}/inbox/machines"; newsgroup = "inbox.comp.sourcephile.machines"; }; pont = { address = [ "pont@${domain}" "public-inbox+pont@${domain}" ]; description = '' pont@${domain} : discussions à l'attention de l'ensemble des personnes à bord. ''; url = "https://mails.${domain}/inbox/pont"; newsgroup = "inbox.comp.sourcephile.pont"; #config.coderepo = [ "sourcephile" ]; }; test = { address = [ "test@${domain}" "public-inbox+test@${domain}" ]; description = '' test@${domain} : une cible de test pour effectuer des tirs de mails. ''; url = "https://mails.${domain}/inbox/test"; newsgroup = "inbox.comp.sourcephile.test"; }; }; /* config.coderepo.sourcephile-nix = { dir = "/var/lib/git/repositories/sourcephile.git"; cgitUrl = "https://${domain}/git/sourcephile"; }; */ }; security.acme.certs."${domain}" = { postRun = "systemctl reload public-inbox-nntp"; }; systemd.services.public-inbox = { wants = [ "acme-selfsigned-${domain}.service" "acme-${domain}.service"]; after = [ "acme-selfsigned-${domain}.service" ]; }; }