Compare commits
2 Commits
b9f78639c8
...
3406af1780
Author | SHA1 | Date |
---|---|---|
Mateusz Słodkowicz | 3406af1780 | |
Mateusz Słodkowicz | f892292aa0 |
|
@ -11,7 +11,7 @@
|
||||||
./samba.nix
|
./samba.nix
|
||||||
./syncthing.nix
|
./syncthing.nix
|
||||||
./jellyfin.nix
|
./jellyfin.nix
|
||||||
./grafana.nix
|
./monitoring.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.grafana.enable = false;
|
waffentragerService.monitoring.enable = true;
|
||||||
}
|
}
|
|
@ -1,9 +1,9 @@
|
||||||
{ materusArg, config, lib, ... }:
|
{ materusArg, config, lib, ... }:
|
||||||
{
|
{
|
||||||
options.waffentragerService.grafana.enable = materusArg.pkgs.lib.mkBoolOpt false "Enable grafana";
|
options.waffentragerService.monitoring.enable = materusArg.pkgs.lib.mkBoolOpt false "Enable monitoring";
|
||||||
config =
|
config =
|
||||||
let
|
let
|
||||||
cfg = config.waffentragerService.grafana;
|
cfg = config.waffentragerService.monitoring;
|
||||||
in
|
in
|
||||||
lib.mkIf cfg.enable {
|
lib.mkIf cfg.enable {
|
||||||
services.grafana = {
|
services.grafana = {
|
||||||
|
@ -21,7 +21,27 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
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