Add configurable ntfy options (tokenFile, url, topic) to the shared emailOnFailure module. When tokenFile is set, a ntfy-failure@ template service is added alongside the existing email notifications. Systems without ntfy configured are unaffected. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
27 lines
581 B
Nix
27 lines
581 B
Nix
{ config, ... }:
|
|
{
|
|
services.ntfy-sh = {
|
|
enable = true;
|
|
settings = {
|
|
base-url = "https://ntfy.hoyer.xyz";
|
|
behind-proxy = true;
|
|
auth-default-access = "deny-all";
|
|
};
|
|
};
|
|
|
|
services.nginx.virtualHosts."ntfy.hoyer.xyz" = {
|
|
useACMEHost = "hoyer.xyz";
|
|
enableACME = false;
|
|
forceSSL = true;
|
|
locations."/" = {
|
|
proxyPass = "http://127.0.0.1:2586";
|
|
proxyWebsockets = true;
|
|
};
|
|
};
|
|
|
|
metacfg.emailOnFailure.ntfy = {
|
|
tokenFile = config.sops.secrets.ntfy.path;
|
|
url = "http://127.0.0.1:2586";
|
|
topic = "alerts";
|
|
};
|
|
}
|