diff options
Diffstat (limited to 'hosts/vidhar')
-rw-r--r-- | hosts/vidhar/prometheus/default.nix | 19 |
1 files changed, 18 insertions, 1 deletions
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 @@ | |||
1 | { config, lib, pkgs, ... }: | 1 | { config, lib, pkgs, ... }: |
2 | |||
3 | with lib; | ||
4 | |||
2 | let | 5 | let |
3 | relabelHosts = [ | 6 | relabelHosts = [ |
4 | { source_labels = ["__address__"]; | 7 | { source_labels = ["__address__"]; |
@@ -42,7 +45,21 @@ in { | |||
42 | controlInterface = "/run/unbound/unbound.ctl"; | 45 | controlInterface = "/run/unbound/unbound.ctl"; |
43 | group = config.services.unbound.group; | 46 | group = config.services.unbound.group; |
44 | }; | 47 | }; |
45 | wireguard.enable = true; | 48 | wireguard = { |
49 | enable = true; | ||
50 | wireguardConfig = | ||
51 | let | ||
52 | keys = { | ||
53 | "sif" = ["yioRagUtRvalJLrTtLp8NPiym6a3RpIcqgVfNL1iyRA=" "zIgyMw5wSernKPmMfDZ+fqaYUjbIQUhsXe+7hIZgJho="]; | ||
54 | "surtr" = ["YP/sWEUWw51czlGxvgrgyEZ+ssx/3C9siufgd0a8d3g=" "6V2EjwvZ07Pebc9g9TNqIlQu57MvqyUsCeIOzky4Txw="]; | ||
55 | "vidhar" = ["IOuHpNQ2ff09HCPKtKY95lDXoRhd8FIBsbB8kaMeUUA=" "jdaF4sx+dhdkTNGxQI6g6JV4XwXgD9QQJQ4f0NYy1gY="]; | ||
56 | }; | ||
57 | in concatMapStringsSep "\n" ({ name, value }: '' | ||
58 | [Peer] | ||
59 | # ${name} | ||
60 | PublicKey=${value} | ||
61 | '') (concatLists (mapAttrsToList (host: hostKeys: map (nameValuePair host) hostKeys) keys)); | ||
62 | }; | ||
46 | }; | 63 | }; |
47 | 64 | ||
48 | scrapeConfigs = [ | 65 | scrapeConfigs = [ |