2020-08-22 17:44:39 +02:00
|
|
|
{ config, ... }:
|
|
|
|
|
|
|
|
let
|
|
|
|
vpnNetRanges = config.networking.wireguard.interfaces.wg-home.ips;
|
|
|
|
vpnNetRange = builtins.elemAt vpnNetRanges 0;
|
|
|
|
vpnAddress = builtins.elemAt (builtins.split "/" vpnNetRange) 0;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
imports = [
|
|
|
|
../wireguard/home.nix
|
|
|
|
];
|
|
|
|
|
|
|
|
services.prometheus.exporters.node = {
|
|
|
|
enable = true;
|
|
|
|
listenAddress = vpnAddress;
|
2020-09-01 11:24:36 +02:00
|
|
|
enabledCollectors = [ "systemd " ];
|
2020-08-22 17:44:39 +02:00
|
|
|
};
|
2020-08-22 17:56:50 +02:00
|
|
|
|
|
|
|
systemd.services.prometheus-node-exporter.after = [ "wireguard-wg-home.service" ];
|
2020-08-22 17:44:39 +02:00
|
|
|
}
|