Compare commits

..

1 Commits

Author SHA1 Message Date
oysteikt ab518714a5 bekkalokk/well-known: advertise TLS SMTP in autoconfig/mail
Build topology graph / evals (push) Successful in 2m14s
Eval nix flake / evals (push) Successful in 7m14s
2026-07-25 23:24:57 +02:00
5 changed files with 2 additions and 73 deletions
-1
View File
@@ -13,7 +13,6 @@
./services/mediawiki
./services/nginx.nix
./services/phpfpm.nix
./services/prometheus-phpfpm-exporter.nix
./services/vaultwarden.nix
./services/webmail
./services/website
@@ -1,54 +0,0 @@
{ config, lib, values, ... }:
let
cfg = config.services.prometheus.exporters.php-fpm;
pools = [
"idp"
"mediawiki"
"pvv-nettsiden"
"roundcube"
"snappymail"
];
in
{
services.phpfpm.pools = lib.genAttrs pools (_: {
settings."pm.status_path" = "/status";
});
services.prometheus.exporters.php-fpm = {
enable = true;
listenAddress = "127.0.0.1";
extraFlags = [
"--phpfpm.scrape-uri=${lib.concatMapStringsSep "," (name: "unix://${config.services.phpfpm.pools.${name}.socket};/status") pools}"
];
};
systemd.services.prometheus-php-fpm-exporter.serviceConfig = {
Slice = "system-monitoring.slice";
SupplementaryGroups = [ config.services.nginx.group ];
RestrictAddressFamilies = lib.mkForce [
"AF_INET"
"AF_INET6"
"AF_UNIX"
];
};
services.nginx = lib.mkIf cfg.enable {
virtualHosts."www.pvv.ntnu.no" = lib.mkIf config.services.nginx.enable {
forceSSL = true;
enableACME = true;
kTLS = true;
locations."/prometheus-php-fpm-exporter/metrics" = {
proxyPass = "http://localhost:${toString cfg.port}/metrics";
extraConfig = ''
allow 127.0.0.1;
allow ::1;
allow ${values.hosts.ildkule.ipv4};
allow ${values.hosts.ildkule.ipv6};
deny all;
'';
};
};
};
}
@@ -16,8 +16,8 @@
<outgoingServer type="smtp">
<hostname>smtp.pvv.ntnu.no</hostname>
<port>587</port>
<socketType>STARTTLS</socketType>
<port>465</port>
<socketType>SSL</socketType>
<username>%EMAILLOCALPART%</username>
<authentication>password-cleartext</authentication>
<useGlobalPreferredServer>true</useGlobalPreferredServer>
@@ -7,7 +7,6 @@ in {
./machines.nix
./matrix-synapse.nix
./mysqld.nix
./phpfpm.nix
./postgres.nix
];
@@ -1,15 +0,0 @@
{ ... }:
{
services.prometheus.scrapeConfigs = [{
job_name = "phpfpm";
scheme = "https";
metrics_path = "/prometheus-php-fpm-exporter/metrics";
static_configs = [
{
labels.hostname = "bekkalokk";
targets = [ "www.pvv.ntnu.no:443" ];
}
];
}];
}