mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-03 13:30:36 +00:00
Merge pull request #178348 from NixOS/backport-177935-to-release-22.05
[Backport release-22.05] nixos/prometheus-postfix-exporter: fixes for systemd integration
This commit is contained in:
@@ -74,11 +74,13 @@ in
|
||||
};
|
||||
};
|
||||
serviceOpts = {
|
||||
after = mkIf cfg.systemd.enable [ cfg.systemd.unit ];
|
||||
serviceConfig = {
|
||||
DynamicUser = false;
|
||||
# By default, each prometheus exporter only gets AF_INET & AF_INET6,
|
||||
# but AF_UNIX is needed to read from the `showq`-socket.
|
||||
RestrictAddressFamilies = [ "AF_UNIX" ];
|
||||
SupplementaryGroups = mkIf cfg.systemd.enable [ "systemd-journal" ];
|
||||
ExecStart = ''
|
||||
${pkgs.prometheus-postfix-exporter}/bin/postfix_exporter \
|
||||
--web.listen-address ${cfg.listenAddress}:${toString cfg.port} \
|
||||
|
||||
Reference in New Issue
Block a user