nixos/prometheus-postfix-exporter: fixes for systemd integration
* Allow the service to read from the journal w/systemd.enable * Ensure that the service is started after postfix.service
This commit is contained in:
parent
cb94b38115
commit
5ab65d9cd1
@ -74,11 +74,13 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
serviceOpts = {
|
serviceOpts = {
|
||||||
|
after = mkIf cfg.systemd.enable [ cfg.systemd.unit ];
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
DynamicUser = false;
|
DynamicUser = false;
|
||||||
# By default, each prometheus exporter only gets AF_INET & AF_INET6,
|
# By default, each prometheus exporter only gets AF_INET & AF_INET6,
|
||||||
# but AF_UNIX is needed to read from the `showq`-socket.
|
# but AF_UNIX is needed to read from the `showq`-socket.
|
||||||
RestrictAddressFamilies = [ "AF_UNIX" ];
|
RestrictAddressFamilies = [ "AF_UNIX" ];
|
||||||
|
SupplementaryGroups = mkIf cfg.systemd.enable [ "systemd-journal" ];
|
||||||
ExecStart = ''
|
ExecStart = ''
|
||||||
${pkgs.prometheus-postfix-exporter}/bin/postfix_exporter \
|
${pkgs.prometheus-postfix-exporter}/bin/postfix_exporter \
|
||||||
--web.listen-address ${cfg.listenAddress}:${toString cfg.port} \
|
--web.listen-address ${cfg.listenAddress}:${toString cfg.port} \
|
||||||
|
Loading…
Reference in New Issue
Block a user