flake: add commonModules and enable nixos-exporter on all hosts
Some checks failed
Run nix flake check / flake-check (push) Has been cancelled

Refactor flake.nix to use a commonModules list for modules shared by
all hosts (overlays, sops-nix, nixos-exporter). This simplifies adding
new modules that apply to all hosts.

Move nixos-exporter configuration to system/monitoring/metrics.nix
alongside node-exporter and systemd-exporter.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-02-06 23:53:34 +01:00
parent e57623f8a1
commit a47e95f9d2
3 changed files with 50 additions and 145 deletions

View File

@@ -99,23 +99,6 @@
];
};
# NixOS metrics exporter
services.prometheus.exporters.nixos = {
enable = true;
flake = {
enable = true;
url = "git+https://git.t-juice.club/torjus/nixos-servers.git";
};
};
# Register nixos-exporter as a Prometheus scrape target
homelab.monitoring.scrapeTargets = [
{
job_name = "nixos-exporter";
port = 9971;
}
];
labmon = {
enable = true;