nixos-config/modules/prometheus/node_exporter.nix
Simon Bruder db1348014e
Update to 20.09
MPV is disabled since the override options no longer work.
This also applies updated formatting.
2020-09-25 22:32:42 +02:00

20 lines
481 B
Nix

{ 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;
enabledCollectors = [ "systemd " ];
};
systemd.services.prometheus-node-exporter.after = [ "wireguard-wg-home.service" ];
}