0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-14 06:00:33 +03:00

Merge pull request #222080 from Stunkymonkey/nixos-optionalString

This commit is contained in:
Artturi 2023-04-20 16:07:30 +03:00 committed by GitHub
commit b83db86a9e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
41 changed files with 89 additions and 95 deletions

View file

@ -58,10 +58,10 @@ in
};
};
serviceOpts = let
collectSettingsArgs = if (cfg.collectdBinary.enable) then ''
collectSettingsArgs = optionalString (cfg.collectdBinary.enable) ''
--collectd.listen-address ${cfg.collectdBinary.listenAddress}:${toString cfg.collectdBinary.port} \
--collectd.security-level ${cfg.collectdBinary.securityLevel} \
'' else "";
'';
in {
serviceConfig = {
ExecStart = ''