nix/nixos/services/ntfy.nix
2025-05-23 18:32:59 +01:00

20 lines
443 B
Nix

{config, ...}: let
domain = "up.${config.networking.domain}";
port = 8080;
in {
services.ntfy-sh = {
enable = true;
settings = {
base-url = "https://${domain}";
listen-http = ":${toString port}";
};
};
services.nginx.virtualHosts.${domain} = {
forceSSL = true;
enableACME = true;
locations."~" = {
proxyPass = "http://localhost:${toString port}";
proxyWebsockets = true;
};
};
}