monitoring: add nixos-exporter to all hosts
All checks were successful
Run nix flake check / flake-check (push) Successful in 3m16s
Run nix flake check / flake-check (pull_request) Successful in 3m14s

Add nixos-exporter prometheus exporter to track NixOS generation metrics
and flake revision status across all hosts.

Changes:
- Add nixos-exporter flake input
- Add commonModules list in flake.nix for modules shared by all hosts
- Enable nixos-exporter in system/monitoring/metrics.nix
- Configure Prometheus to scrape nixos-exporter on all hosts

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-02-06 23:55:29 +01:00
parent f2c30cc24f
commit 97ff774d3f
3 changed files with 76 additions and 127 deletions

21
flake.lock generated
View File

@@ -42,6 +42,26 @@
"url": "https://git.t-juice.club/torjus/labmon"
}
},
"nixos-exporter": {
"inputs": {
"nixpkgs": [
"nixpkgs-unstable"
]
},
"locked": {
"lastModified": 1770417341,
"narHash": "sha256-Js2EJZlpol6eSWVGyYy6SAhIISKHfURnD6S+NBaLfHU=",
"ref": "refs/heads/master",
"rev": "e381038537bbee314fb0326ac7d17ec4f651fe1e",
"revCount": 7,
"type": "git",
"url": "https://git.t-juice.club/torjus/nixos-exporter"
},
"original": {
"type": "git",
"url": "https://git.t-juice.club/torjus/nixos-exporter"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1770136044,
@@ -78,6 +98,7 @@
"inputs": {
"alerttonotify": "alerttonotify",
"labmon": "labmon",
"nixos-exporter": "nixos-exporter",
"nixpkgs": "nixpkgs",
"nixpkgs-unstable": "nixpkgs-unstable",
"sops-nix": "sops-nix"