about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNguyễn Gia Phong <mcsinyx@disroot.org>2023-06-17 00:36:45 +0900
committerNguyễn Gia Phong <mcsinyx@disroot.org>2023-06-17 00:36:45 +0900
commit4a0ba5f3e38a47fc4542ce2392c70fd8d77c1ba1 (patch)
treeb4fa2779d4d6b72c04d8e15975e81a7cc7ec949e
parent73357ec1520fd52ceeadb272da38423b79d1de75 (diff)
downloadnixos-conf-4a0ba5f3e38a47fc4542ce2392c70fd8d77c1ba1.tar.gz
Update for latest unstable
ntfy was debugged by xarvos.

Fixes: https://github.com/NixOS/nixpkgs/pull/234811
-rw-r--r--configuration.nix2
-rw-r--r--push.nix14
2 files changed, 11 insertions, 5 deletions
diff --git a/configuration.nix b/configuration.nix
index 5f94597..cdda865 100644
--- a/configuration.nix
+++ b/configuration.nix
@@ -54,7 +54,7 @@
   services.openssh = {
     enable = true;
     openFirewall = true;
-    settings.passwordAuthentication = false;
+    settings.PasswordAuthentication = false;
     ports = [ 2211 ];
   };
 
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;
       };
     };