nixos/prometheus-exporters: fix unapplied service config
Prior to this commit, the default values for `Restart`, `PrivateTmp` and `WorkingDirectory` were falsely ignored. I also added myself as maintainer.
This commit is contained in:
parent
24320f4a9e
commit
fbb7e0c82f
1 changed files with 11 additions and 10 deletions
|
@ -123,15 +123,13 @@ let
|
|||
systemd.services."prometheus-${name}-exporter" = mkMerge ([{
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "network.target" ];
|
||||
serviceConfig = {
|
||||
Restart = mkDefault "always";
|
||||
PrivateTmp = mkDefault true;
|
||||
WorkingDirectory = mkDefault /tmp;
|
||||
} // mkIf (!(serviceOpts.serviceConfig.DynamicUser or false)) {
|
||||
User = conf.user;
|
||||
Group = conf.group;
|
||||
};
|
||||
} serviceOpts ]);
|
||||
serviceConfig.Restart = mkDefault "always";
|
||||
serviceConfig.PrivateTmp = mkDefault true;
|
||||
serviceConfig.WorkingDirectory = mkDefault /tmp;
|
||||
} serviceOpts ] ++ optional (serviceOpts.serviceConfig.DynamicUser or false) {
|
||||
serviceConfig.User = conf.user;
|
||||
serviceConfig.Group = conf.group;
|
||||
});
|
||||
};
|
||||
in
|
||||
{
|
||||
|
@ -172,5 +170,8 @@ in
|
|||
}) exporterOpts)
|
||||
);
|
||||
|
||||
meta.doc = ./exporters.xml;
|
||||
meta = {
|
||||
doc = ./exporters.xml;
|
||||
maintainers = [ maintainers.willibutz ];
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue