mirror of
https://github.com/anotherhadi/nixy.git
synced 2026-04-04 12:02:09 +02:00
21
hosts/server/modules/exposed/ntfy-sh.nix
Normal file
21
hosts/server/modules/exposed/ntfy-sh.nix
Normal file
@@ -0,0 +1,21 @@
|
||||
# Push Notification Server
|
||||
# https://mynixos.com/nixpkgs/options/services.ntfy-sh
|
||||
let
|
||||
hostname = "ntfy.anotherhadi.com";
|
||||
port = 8082;
|
||||
url = "https://" + hostname;
|
||||
in {
|
||||
services.ntfy-sh = {
|
||||
enable = true;
|
||||
settings = {
|
||||
base-url = url;
|
||||
listen-http = "127.0.0.1:${toString port}";
|
||||
behind-proxy = true;
|
||||
};
|
||||
};
|
||||
services.nginx.virtualHosts.${hostname} = {
|
||||
enableACME = true;
|
||||
locations."/" = { proxyPass = "http://127.0.0.1:${toString port}"; };
|
||||
};
|
||||
networking.firewall.allowedTCPPorts = [ port ];
|
||||
}
|
||||
Reference in New Issue
Block a user