Fix Prometheus and Woodpecker (#17)

This commit is contained in:
Patrick Stevens
2023-07-23 10:23:08 +01:00
committed by GitHub
parent e5254f4e1c
commit e8cf9916ee
6 changed files with 17 additions and 3 deletions

View File

@@ -16,13 +16,21 @@
description = lib.mdDoc "Localhost port for node exporter";
default = 9003;
};
domain-exporter-domains = lib.mkOption {
type = lib.types.listOf lib.types.str;
description = lib.mdDoc "Paths to be interpolated into the domain-exporter config.";
example = "example.com";
};
};
};
config = {
# For the domain exporter
environment.etc."domain-exporter/domains.yaml" = {
source = builtins.replaceStrings ["%%DOMAINS%%"] ["patrickstevens.co.uk"] ./domains.yaml;
text = let
interp = builtins.concatStringsSep "\", \"" config.services.prometheus-config.domain-exporter-domains;
in
builtins.replaceStrings ["%%DOMAINS%%"] [interp] (builtins.readFile ./domains.yaml);
};
services.prometheus = {