mirror of
https://github.com/harryssecret/homelab-nix.git
synced 2025-08-08 14:40:19 +02:00
72 lines
1.5 KiB
Nix
72 lines
1.5 KiB
Nix
{ config, ... }:
|
|
{
|
|
services.prometheus = {
|
|
enable = true;
|
|
exporters = {
|
|
node = {
|
|
enable = true;
|
|
enabledCollectors = [
|
|
"logind"
|
|
"systemd"
|
|
];
|
|
port = 9002;
|
|
};
|
|
borgmatic = {
|
|
enable = true;
|
|
};
|
|
systemd = {
|
|
enable = true;
|
|
};
|
|
# TODO: enable prometheus services based on whether they are enabled or not
|
|
/*
|
|
sabnzbd = {
|
|
enable = true;
|
|
|
|
servers = [
|
|
{
|
|
"sisyphe" = {
|
|
baseUrl = "http://nzb.sisyphe.normandy.rougebordeaux.xyz";
|
|
apiKeyFile = "/run/secrets/sabnbzd_apikey";
|
|
};
|
|
}
|
|
];
|
|
};
|
|
*/
|
|
redis = {
|
|
enable = true;
|
|
};
|
|
postgres = {
|
|
enable = true;
|
|
};
|
|
pihole = {
|
|
enable = true;
|
|
piholeHostname = "192.168.1.25";
|
|
};
|
|
php-fpm = {
|
|
enable = true;
|
|
};
|
|
/*
|
|
TODO: need to fix secrets before
|
|
nextcloud = {
|
|
enable = true;
|
|
url = "https://cloud.rougebordeaux.xyz";
|
|
tokenFile = "/run/secrets/nextcloudTokenFile";
|
|
};
|
|
*/
|
|
};
|
|
scrapeConfigs = [
|
|
|
|
{
|
|
job_name = "homelab-stats";
|
|
static_configs = [
|
|
{
|
|
targets = [
|
|
"localhost:${builtins.toString config.services.prometheus.exporters.node.port}"
|
|
"192.168.1.197:9100"
|
|
];
|
|
}
|
|
];
|
|
}
|
|
];
|
|
};
|
|
}
|