From acf56e4589f4b968d22186b624e652b2021d2fa2 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Fri, 31 Dec 2021 23:59:18 +0100 Subject: vidhar: prometheus: ... --- hosts/vidhar/prometheus/default.nix | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'hosts') diff --git a/hosts/vidhar/prometheus/default.nix b/hosts/vidhar/prometheus/default.nix index e85d64fc..e429df4b 100644 --- a/hosts/vidhar/prometheus/default.nix +++ b/hosts/vidhar/prometheus/default.nix @@ -1,4 +1,7 @@ { config, lib, pkgs, ... }: + +with lib; + let relabelHosts = [ { source_labels = ["__address__"]; @@ -42,7 +45,21 @@ in { controlInterface = "/run/unbound/unbound.ctl"; group = config.services.unbound.group; }; - wireguard.enable = true; + wireguard = { + enable = true; + wireguardConfig = + let + keys = { + "sif" = ["yioRagUtRvalJLrTtLp8NPiym6a3RpIcqgVfNL1iyRA=" "zIgyMw5wSernKPmMfDZ+fqaYUjbIQUhsXe+7hIZgJho="]; + "surtr" = ["YP/sWEUWw51czlGxvgrgyEZ+ssx/3C9siufgd0a8d3g=" "6V2EjwvZ07Pebc9g9TNqIlQu57MvqyUsCeIOzky4Txw="]; + "vidhar" = ["IOuHpNQ2ff09HCPKtKY95lDXoRhd8FIBsbB8kaMeUUA=" "jdaF4sx+dhdkTNGxQI6g6JV4XwXgD9QQJQ4f0NYy1gY="]; + }; + in concatMapStringsSep "\n" ({ name, value }: '' + [Peer] + # ${name} + PublicKey=${value} + '') (concatLists (mapAttrsToList (host: hostKeys: map (nameValuePair host) hostKeys) keys)); + }; }; scrapeConfigs = [ -- cgit v1.2.3