mirror of
https://github.com/Ahwxorg/nixos-config.git
synced 2025-12-04 15:00:13 +01:00
feat: adds ntfy-sh
This commit is contained in:
parent
3f20418fa5
commit
f62e354f7f
1 changed files with 31 additions and 0 deletions
31
modules/services/ntfy.nix
Normal file
31
modules/services/ntfy.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
||||||
|
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;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
nginx.virtualHosts.${hostname} = {
|
||||||
|
useACMEHost = "liv.town";
|
||||||
|
forceSSL = true;
|
||||||
|
locations."/" = { proxyPass = "http://127.0.0.1:${toString port}"; };
|
||||||
|
};
|
||||||
|
frp.settings.proxies = [
|
||||||
|
{
|
||||||
|
name = "http";
|
||||||
|
type = "tcp";
|
||||||
|
localIP = "localhost";
|
||||||
|
localPort = port;
|
||||||
|
remotePort = port;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
networking.firewall.allowedTCPPorts = [ port ];
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue