lol

nixos/prometheus/alertmanager: double hyphenate long opts (#34914)

Alertmanager 0.13.0 doesn't support single dash long options, so '-config.file'
for example is parsed as '-c', which leads to the service not starting.

authored by

Ruben Maher and committed by
Benjamin Staffin
ac52cb3a 6acfa356

+5 -5
+5 -5
nixos/modules/services/monitoring/prometheus/alertmanager.nix
··· 111 111 after = [ "network.target" ]; 112 112 script = '' 113 113 ${pkgs.prometheus-alertmanager.bin}/bin/alertmanager \ 114 - -config.file ${alertmanagerYml} \ 115 - -web.listen-address ${cfg.listenAddress}:${toString cfg.port} \ 116 - -log.level ${cfg.logLevel} \ 117 - ${optionalString (cfg.webExternalUrl != null) ''-web.external-url ${cfg.webExternalUrl} \''} 118 - ${optionalString (cfg.logFormat != null) "-log.format ${cfg.logFormat}"} 114 + --config.file ${alertmanagerYml} \ 115 + --web.listen-address ${cfg.listenAddress}:${toString cfg.port} \ 116 + --log.level ${cfg.logLevel} \ 117 + ${optionalString (cfg.webExternalUrl != null) ''--web.external-url ${cfg.webExternalUrl} \''} 118 + ${optionalString (cfg.logFormat != null) "--log.format ${cfg.logFormat}"} 119 119 ''; 120 120 121 121 serviceConfig = {