nixos-config/modules/services/ntfy.nix

38 lines
888 B
Nix
Raw Normal View History

2024-09-26 13:17:48 +02:00
let
hostname = "notify.liv.town";
port = 2586;
url = "https://" + hostname;
in {
services = {
ntfy-sh = {
enable = true;
settings = {
base-url = url;
listen-http = "127.0.0.1:${toString port}";
behind-proxy = true;
2025-02-08 11:43:13 +01:00
visitor-attachment-daily-bandwidth-limit = "10M";
visitor-request-limit-burst = 5;
visitor-request-limit-replenish = "15s";
2024-09-26 13:17:48 +02:00
};
};
nginx.virtualHosts.${hostname} = {
useACMEHost = "liv.town";
forceSSL = true;
2024-12-19 18:22:06 +01:00
locations."/" = {
proxyPass = "http://127.0.0.1:${toString port}";
proxyWebsockets = true;
};
2024-09-26 13:17:48 +02:00
};
frp.settings.proxies = [
{
name = "http";
type = "tcp";
localIP = "localhost";
localPort = port;
remotePort = port;
}
];
};
networking.firewall.allowedTCPPorts = [ port ];
}