mirror of
https://git.pvv.ntnu.no/Drift/pvv-nixos-config.git
synced 2026-05-12 17:41:15 +02:00
WIP: temmie/userweb: use IPC to proxy sendmail requests out of sandbox
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
{ config, lib, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
{
|
{
|
||||||
services.postfix.enable = lib.mkForce false;
|
services.postfix.enable = lib.mkForce false;
|
||||||
|
|
||||||
@@ -9,4 +9,26 @@
|
|||||||
remotes = "mail.pvv.ntnu.no smtp --port=25";
|
remotes = "mail.pvv.ntnu.no smtp --port=25";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
systemd.sockets.userweb-sendmail-sandbox-proxy = {
|
||||||
|
wantedBy = [ "sockets.target" ];
|
||||||
|
listenStreams = [ "/run/userweb-sendmail-sandbox-proxy.sock" ];
|
||||||
|
socketConfig = {
|
||||||
|
# Accept = true;
|
||||||
|
SocketUser = "httpd";
|
||||||
|
SocketGroup = "httpd"; # TODO: is wwwrun(54) in this group?
|
||||||
|
SocketMode = "0660";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.services.userweb-sendmail-sandbox-proxy = {
|
||||||
|
serviceConfig = {
|
||||||
|
User = "root";
|
||||||
|
Group = "root";
|
||||||
|
Sockets = [
|
||||||
|
"userweb-sendmail-sandbox-proxy.socket"
|
||||||
|
];
|
||||||
|
ExecStart = "${lib.getExe pkgs.hello}";
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user