nixos-config/modules/services/smart-monitoring.nix

42 lines
922 B
Nix
Raw Normal View History

{ config, host, ... }:
{
imports = [ ./email.nix ];
2024-12-19 18:23:38 +01:00
services.scrutiny = {
# Enable based on name of host
enable =
if (host == "dandelion") then
true
else if (host == "sunflower") then
true
else
false;
2024-12-19 18:23:38 +01:00
collector.enable = true;
settings.web.listen.port = 8181;
settings.notify.urls = [
# "ntfy://${config.liv.variables.ntfyURL}/${config.networking.hostName}"
"ntfy://notify.liv.town/${config.networking.hostName}"
2024-12-19 18:23:38 +01:00
];
};
services.smartd = {
enable = true;
autodetect = true;
notifications = {
wall = {
enable = true;
};
mail = {
enable = true;
sender = config.liv.variables.senderEmail;
recipient = config.liv.variables.email;
};
};
};
# services.nginx.virtualHosts."" = {
# locations."/" = {
# proxyPass = "http://localhost:8181/";
# };
# };
2024-12-19 18:23:38 +01:00
}