flake: add commonModules and enable nixos-exporter on all hosts
Some checks failed
Run nix flake check / flake-check (push) Has been cancelled
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:
@@ -18,4 +18,21 @@
|
||||
"--systemd.collector.enable-ip-accounting"
|
||||
];
|
||||
};
|
||||
|
||||
services.prometheus.exporters.nixos = {
|
||||
enable = true;
|
||||
# Default port: 9971
|
||||
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;
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user