fix: paren required on function

This commit is contained in:
Noah Masur 2023-07-04 17:21:53 -06:00
parent 4b0d68089a
commit b599162090

View File

@ -20,16 +20,15 @@
webExternalUrl = lib.mkIf config.services.grafana.enable webExternalUrl = lib.mkIf config.services.grafana.enable
"https://${config.prometheusServer}"; "https://${config.prometheusServer}";
# Web config file: https://prometheus.io/docs/prometheus/latest/configuration/https/ # Web config file: https://prometheus.io/docs/prometheus/latest/configuration/https/
webConfigFile = webConfigFile = lib.mkIf config.services.grafana.enable
lib.mkIf config.services.grafana.enable (pkgs.formats.yaml { }).generate ((pkgs.formats.yaml { }).generate "webconfig.yml" {
"webconfig.yml" {
basic_auth_users = { basic_auth_users = {
# Generate password: htpasswd -nBC 10 "" | tr -d ':\n' # Generate password: htpasswd -nBC 10 "" | tr -d ':\n'
# Encrypt and place in private/prometheus.age # Encrypt and place in private/prometheus.age
"prometheus" = "prometheus" =
"$2y$10$r7FWHLHTGPAY312PdhkPEuvb05aGn9Nk1IO7qtUUUjmaDl35l6sLa"; "$2y$10$r7FWHLHTGPAY312PdhkPEuvb05aGn9Nk1IO7qtUUUjmaDl35l6sLa";
}; };
}; });
remoteWrite = lib.mkIf (!config.services.grafana.enable) [{ remoteWrite = lib.mkIf (!config.services.grafana.enable) [{
name = config.networking.hostName; name = config.networking.hostName;
url = "https://${config.prometheusServer}"; url = "https://${config.prometheusServer}";