postRun = "systemctl try-restart public-inbox-nntpd public-inbox-imapd";
};
networking.nftables.ruleset = ''
- add rule inet filter net2fw tcp dport ${toString public-inbox.nntp.port} counter accept comment "NNTPS"
- add rule inet filter net2fw tcp dport 1993 counter accept comment "IMAPS"
+ table inet filter {
+ chain input-net {
+ tcp dport ${toString public-inbox.nntp.port} counter accept comment "public-inbox: NNTPS"
+ tcp dport 1993 counter accept comment "public-inbox: IMAPS"
+ }
+ chain output-net {
+ }
+ }
'';
fileSystems."/var/lib/public-inbox" = {
device = "rpool/var/public-inbox";
};
systemd.services = {
public-inbox-httpd = {
+ confinement.enable = true;
serviceConfig = {
SupplementaryGroups = [ groups."git-daemon".name ];
- BindReadOnlyPaths = [ "/var/lib/acme/${domain}" ];
+ #BindReadOnlyPaths = [ "/var/lib/acme/${domain}" ];
};
};
public-inbox-imapd = {
+ confinement.enable = true;
wants = [ "acme-selfsigned-${domain}.service" "acme-${domain}.service"];
after = [ "acme-selfsigned-${domain}.service" ];
serviceConfig = {
BindReadOnlyPaths = [ "/var/lib/acme/${domain}" ];
};
};
+ public-inbox-init = {
+ confinement.enable = true;
+ };
public-inbox-nntpd = {
+ confinement.enable = true;
wants = [ "acme-selfsigned-${domain}.service" "acme-${domain}.service"];
after = [ "acme-selfsigned-${domain}.service" ];
serviceConfig = {
};
services.public-inbox = {
enable = true;
+ postfix.enable = true;
settings.publicinbox = {
css = [ "href=https://mails.${domain}/style/light.css" ];
nntpserver = [ "nntps://news.${domain}" ];
wwwlisting = "match=domain";
+ #imapserver = [ "mails.${domain}" ];
};
mda = {
enable = true;
news = {
address = [
"news@${domain}"
- "public-inbox+news@${domain}"
];
description = ''
news@${domain} :
chat = {
address = [
"chat@${domain}"
- "public-inbox+chat@${domain}"
];
description = ''
chat@${domain} :
contact = {
address = [
"contact@${domain}"
- "public-inbox+contact@${domain}"
];
description = ''
contact@${domain} :
environnement = {
address = [
"environnement@${domain}"
- "public-inbox+environnement@${domain}"
];
description = ''
environnement@${domain} :
labo = {
address = [
"labo@${domain}"
- "public-inbox+labo@${domain}"
];
description = ''
labo@${domain} :
prod = {
address = [
"prod@${domain}"
- "public-inbox+prod@${domain}"
];
description = ''
prod@${domain} :
orga = {
address = [
"orga@${domain}"
- "public-inbox+orga@${domain}"
];
description = ''
orga@${domain} :
test = {
address = [
"test@${domain}"
- "public-inbox+test@${domain}"
];
description = ''
test@${domain} :
} // lib.genAttrs (map baseNameOf repositories) (name: {
address = [
"${name}@${domain}"
- "public-inbox+${name}@${domain}"
];
description = ''
${name}@${domain} :
cgitUrl = "https://code.${domain}/${path}.git";
}) repositories);
};
-services.postfix.virtual = lib.concatMapStringsSep "\n" (name: ''
- ${name}@${domain} public-inbox@localhost
-'') (map baseNameOf repositories);
services.sanoid.datasets."rpool/var/public-inbox" = {
use_template = [ "snap" ];
daily = 7;