diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2021-12-31 23:59:18 +0100 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2021-12-31 23:59:18 +0100 |
commit | acf56e4589f4b968d22186b624e652b2021d2fa2 (patch) | |
tree | 0fc2c9353744e6054662beac0083d01eedd68504 /hosts/vidhar/prometheus | |
parent | 7ce049462af675c13e756705bc11d8858c076dea (diff) | |
download | nixos-acf56e4589f4b968d22186b624e652b2021d2fa2.tar nixos-acf56e4589f4b968d22186b624e652b2021d2fa2.tar.gz nixos-acf56e4589f4b968d22186b624e652b2021d2fa2.tar.bz2 nixos-acf56e4589f4b968d22186b624e652b2021d2fa2.tar.xz nixos-acf56e4589f4b968d22186b624e652b2021d2fa2.zip |
vidhar: prometheus: ...
Diffstat (limited to 'hosts/vidhar/prometheus')
-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 = [ |