git.iko.soy/typeable/nixpkgs
on master help sign in
nixos/prometheus: get rid of empty arguments

Previously the prometheus.service file looked like: ExecStart=/nix/store/wjkhfw3xgkmavz1akkqir99w4lbqhak7-prometheus-1.8.2-bin/bin/prometheus -storage.local.path=/var/lib/prometheus/metrics \ -config.file=/nix/store/zsnvzw51mk3n1cxjd0351bj39k1j6j27-prometheus.yml-check-config-checked \ -web.listen-address=0.0.0.0:9090 \ -alertmanager.notification-queue-capacity=10000 \ -alertmanager.timeout=10s \ \ Restart=always Now it's: ExecStart=/nix/store/wjkhfw3xgkmavz1akkqir99w4lbqhak7-prometheus-1.8.2-bin/bin/prometheus \ -storage.local.path=/var/lib/prometheus/metrics \ -config.file=/nix/store/zsnvzw51mk3n1cxjd0351bj39k1j6j27-prometheus.yml-check-config-checked \ -web.listen-address=0.0.0.0:9090 \ -alertmanager.notification-queue-capacity=10000 \ -alertmanager.timeout=10s Restart=always

commit7cf27feb2f8651af20ce14543e71af8672dd0293 authorBas van Dijk <v.dijk.bas@gmail.com> dateMon 8 Apr 2019, 13:55 (8 years ago) parenta59c929
1 file changed+5−5
nixos/modules/services/monitoring/prometheus/default.nix+5−5
nixos/modules/services/monitoring/prometheus/default.nix+5−5
@@ -57,9 +57,9 @@ let
5757 "-web.listen-address=${cfg.listenAddress}"
5858 "-alertmanager.notification-queue-capacity=${toString cfg.alertmanagerNotificationQueueCapacity}"
5959 "-alertmanager.timeout=${toString cfg.alertmanagerTimeout}s"
60− (optionalString (cfg.alertmanagerURL != []) "-alertmanager.url=${concatStringsSep "," cfg.alertmanagerURL}")
61− (optionalString (cfg.webExternalUrl != null) "-web.external-url=${cfg.webExternalUrl}")
62− ];
60+ ] ++
61+ (optional (cfg.alertmanagerURL != []) "-alertmanager.url=${concatStringsSep "," cfg.alertmanagerURL}") ++
62+ (optional (cfg.webExternalUrl != null) "-web.external-url=${cfg.webExternalUrl}");
6363
6464 # This becomes the main config file for Prometheus 2
6565 promConfig2 = {
@@ -91,8 +91,8 @@ let
9191 "--web.listen-address=${cfg2.listenAddress}"
9292 "--alertmanager.notification-queue-capacity=${toString cfg2.alertmanagerNotificationQueueCapacity}"
9393 "--alertmanager.timeout=${toString cfg2.alertmanagerTimeout}s"
94− (optionalString (cfg2.webExternalUrl != null) "--web.external-url=${cfg2.webExternalUrl}")
95− ];
94+ ] ++
95+ (optional (cfg2.webExternalUrl != null) "--web.external-url=${cfg2.webExternalUrl}");
9696
9797 promTypes.globalConfig = types.submodule {
9898 options = {