nix/nixos/services/ntfy.nix
2024-05-01 14:00:21 +01:00

17 lines
396 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}";
};
}