treewide: format using nixfmt
Signed-off-by: Bloxx12 <charlie@charlieroot.dev> Change-Id: I6a6a69641c36f9763e104087a559c148d0449f00
This commit is contained in:
parent
f4464732e3
commit
e641dfa114
113 changed files with 1545 additions and 1019 deletions
|
@ -3,13 +3,15 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.options) mkEnableOption;
|
||||
|
||||
cfg = config.modules.system.services.prometheus;
|
||||
port = 4022;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.modules.system.services.prometheus.enable = mkEnableOption "Grafana, a graphing service";
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
@ -22,7 +24,10 @@ in {
|
|||
node = {
|
||||
enable = true;
|
||||
port = 4023;
|
||||
enabledCollectors = ["systemd" "processes"];
|
||||
enabledCollectors = [
|
||||
"systemd"
|
||||
"processes"
|
||||
];
|
||||
};
|
||||
|
||||
postgres = {
|
||||
|
@ -39,22 +44,28 @@ in {
|
|||
{
|
||||
job_name = "prometheus";
|
||||
scrape_interval = "30s";
|
||||
static_configs = [{targets = ["localhost:${toString port}"];}];
|
||||
static_configs = [ { targets = [ "localhost:${toString port}" ]; } ];
|
||||
}
|
||||
{
|
||||
job_name = "node";
|
||||
scrape_interval = "30s";
|
||||
static_configs = [{targets = ["localhost:${toString config.services.prometheus.exporters.node.port}"];}];
|
||||
static_configs = [
|
||||
{ targets = [ "localhost:${toString config.services.prometheus.exporters.node.port}" ]; }
|
||||
];
|
||||
}
|
||||
{
|
||||
job_name = "postgres";
|
||||
scrape_interval = "30s";
|
||||
static_configs = [{targets = ["localhost:${toString config.services.prometheus.exporters.postgres.port}"];}];
|
||||
static_configs = [
|
||||
{ targets = [ "localhost:${toString config.services.prometheus.exporters.postgres.port}" ]; }
|
||||
];
|
||||
}
|
||||
{
|
||||
job_name = "nginx";
|
||||
scrape_interval = "30s";
|
||||
static_configs = [{targets = ["localhost:${toString config.services.prometheus.exporters.nginx.port}"];}];
|
||||
static_configs = [
|
||||
{ targets = [ "localhost:${toString config.services.prometheus.exporters.nginx.port}" ]; }
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue