summaryrefslogtreecommitdiff
path: root/os/srv/ntfy.nix
diff options
context:
space:
mode:
authoradikro <adikro@disroot.org>2026-06-17 00:28:00 +0200
committeradikro <adikro@disroot.org>2026-06-17 00:28:00 +0200
commit630da5d0639cada53e26a03f579df0a7bac3b17a (patch)
tree73edd6ea30331d807413d548f9559d89acc38a82 /os/srv/ntfy.nix
parentce7fb7ddd3267291a8d692cc6381dad606288aa5 (diff)
librewolf manual compilation issue
Diffstat (limited to 'os/srv/ntfy.nix')
-rw-r--r--os/srv/ntfy.nix59
1 files changed, 59 insertions, 0 deletions
diff --git a/os/srv/ntfy.nix b/os/srv/ntfy.nix
new file mode 100644
index 0000000..1417c81
--- /dev/null
+++ b/os/srv/ntfy.nix
@@ -0,0 +1,59 @@
+{
+ config,
+ lib,
+ masterDomain,
+ ...
+}:
+let
+ cfg = config.os.srv.ntfy;
+in
+{
+ options.os.srv.ntfy = {
+ enable = lib.mkEnableOption "enables ntfy";
+ proxyConfig = lib.mkOption {
+ type = lib.types.attrs;
+ default = { };
+ };
+ };
+ config = lib.mkIf cfg.enable {
+ services.ntfy-sh = {
+ enable = true;
+ settings = {
+ base-url = "https://ntfy.${masterDomain}";
+
+ listen-http = "127.0.0.1:2586";
+
+ cache-file = "/var/lib/ntfy/cache.db";
+ cache-duration = "72h";
+
+ attachment-cache-dir = "/var/lib/ntfy/attachments";
+ attachment-total-size-limit = "5G";
+ attachment-file-size-limit = "15M";
+ attachment-expiry-duration = "3h";
+
+ behind-proxy = true;
+ };
+ };
+
+ os.srv.ntfy.proxyConfig = {
+ "uptime-kuma.${masterDomain}" = {
+ enableACME = true;
+ forceSSL = true;
+
+ locations."/" = {
+ proxyPass = "http://${config.os.core.network.ips.vm2-gateway}:3001";
+ extraConfig = ''
+ proxy_set_header Connection "";
+ proxy_connect_timeout 1m;
+ proxy_send_timeout 1m;
+ proxy_read_timeout 24h;
+
+ proxy_buffering off;
+ proxy_request_buffering off;
+ chunked_transfer_encoding on;
+ '';
+ };
+ };
+ };
+ };
+}