Compare commits
No commits in common. "3406af17800fec86b25817d098bd40a5166dff4e" and "b9f78639c8a8cf084f9b5d337a270ff0bbd17157" have entirely different histories.
3406af1780
...
b9f78639c8
|
@ -11,7 +11,7 @@
|
||||||
./samba.nix
|
./samba.nix
|
||||||
./syncthing.nix
|
./syncthing.nix
|
||||||
./jellyfin.nix
|
./jellyfin.nix
|
||||||
./monitoring.nix
|
./grafana.nix
|
||||||
./auth
|
./auth
|
||||||
];
|
];
|
||||||
waffentragerService.elements.enable = true;
|
waffentragerService.elements.enable = true;
|
||||||
|
@ -23,5 +23,5 @@
|
||||||
waffentragerService.samba.enable = true;
|
waffentragerService.samba.enable = true;
|
||||||
waffentragerService.jellyfin.enable = true;
|
waffentragerService.jellyfin.enable = true;
|
||||||
waffentragerService.syncthing.enable = true;
|
waffentragerService.syncthing.enable = true;
|
||||||
waffentragerService.monitoring.enable = true;
|
waffentragerService.grafana.enable = false;
|
||||||
}
|
}
|
|
@ -1,9 +1,9 @@
|
||||||
{ materusArg, config, lib, ... }:
|
{ materusArg, config, lib, ... }:
|
||||||
{
|
{
|
||||||
options.waffentragerService.monitoring.enable = materusArg.pkgs.lib.mkBoolOpt false "Enable monitoring";
|
options.waffentragerService.grafana.enable = materusArg.pkgs.lib.mkBoolOpt false "Enable grafana";
|
||||||
config =
|
config =
|
||||||
let
|
let
|
||||||
cfg = config.waffentragerService.monitoring;
|
cfg = config.waffentragerService.grafana;
|
||||||
in
|
in
|
||||||
lib.mkIf cfg.enable {
|
lib.mkIf cfg.enable {
|
||||||
services.grafana = {
|
services.grafana = {
|
||||||
|
@ -21,27 +21,7 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
services.prometheus = {
|
|
||||||
enable = true;
|
|
||||||
port = 3233;
|
|
||||||
globalConfig.scrape_interval = "30s";
|
|
||||||
stateDir = "elements/services/prometheus";
|
|
||||||
scrapeConfigs = [
|
|
||||||
{
|
|
||||||
job_name = "node";
|
|
||||||
static_configs = [{
|
|
||||||
targets = [ "localhost:${toString config.services.prometheus.exporters.node.port}" ];
|
|
||||||
}];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
services.prometheus.exporters.node = {
|
|
||||||
enable = true;
|
|
||||||
port = 3234;
|
|
||||||
enabledCollectors = [ "systemd" ];
|
|
||||||
extraFlags = [ "--collector.ethtool" "--collector.softirqs" "--collector.tcpstat" "--collector.wifi" ];
|
|
||||||
|
|
||||||
};
|
|
||||||
services.nginx.virtualHosts."watchman.materus.pl" = {
|
services.nginx.virtualHosts."watchman.materus.pl" = {
|
||||||
addSSL = true;
|
addSSL = true;
|
||||||
sslTrustedCertificate = "/var/lib/mnt_acme/materus.pl/chain.pem";
|
sslTrustedCertificate = "/var/lib/mnt_acme/materus.pl/chain.pem";
|
Loading…
Reference in New Issue