about summary refs log tree commit diff
path: root/push.nix
diff options
context:
space:
mode:
Diffstat (limited to 'push.nix')
-rw-r--r--push.nix14
1 files changed, 10 insertions, 4 deletions
diff --git a/push.nix b/push.nix
index 235cbcd..a6111c0 100644
--- a/push.nix
+++ b/push.nix
@@ -17,19 +17,25 @@
 # along with loang configuration.  If not, see <https://www.gnu.org/licenses/>.
 
 { config, ... }:
-let address = "localhost:21840";
+let domain = "tin.${config.networking.domain}";
 in {
   services = {
     ntfy-sh = {
       enable = true;
-      settings.listen-http = address;
+      settings = {
+        base-url = "https://${domain}";
+        # Cannot write to log for some reason,
+        # TODO: Ask on their forum about that
+        # log-level = "info";
+        # log-file = "/var/log/ntfy-sh/ntfy.log";
+      };
     };
 
-    nginx.virtualHosts."tin.${config.networking.domain}" = {
+    nginx.virtualHosts."${domain}" = {
       enableACME = true;
       forceSSL = true;
       locations."/" = {
-        proxyPass = "http://${address}";
+        proxyPass = "http://${config.services.ntfy-sh.settings.listen-http}";
         proxyWebsockets = true;
       };
     };