summaryrefslogtreecommitdiff
path: root/adonis/ntfy/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'adonis/ntfy/default.nix')
-rw-r--r--adonis/ntfy/default.nix20
1 files changed, 20 insertions, 0 deletions
diff --git a/adonis/ntfy/default.nix b/adonis/ntfy/default.nix
new file mode 100644
index 0000000..9f97e86
--- /dev/null
+++ b/adonis/ntfy/default.nix
@@ -0,0 +1,20 @@
+{config, ...}: let
+ ntfyDomain = "push.${config.customOps.domain.fqdn}";
+ listen = "127.0.0.1:2586";
+in {
+ services.ntfy-sh = {
+ enable = true;
+ settings = {
+ base-url = "https://${ntfyDomain}";
+ behind-proxy = true;
+ auth-access = ["*:up*:write-only"];
+ listen-http = listen;
+ };
+ };
+
+ services.nginx.virtualHosts.${ntfyDomain} = {
+ forceSSL = true;
+ enableACME = true;
+ locations."/".proxyPass = "http://${listen}";
+ };
+}