1
0
Fork 0
dotfiles/system/nixos/ntfy-sh.nix

44 lines
1 KiB
Nix
Raw Permalink Normal View History

2023-02-18 19:54:15 +00:00
{ secret, ... }:
{
services.ntfy-sh = {
enable = true;
settings = {
2023-07-21 11:59:14 +00:00
base-url = "https://ntfy.kempkens.io";
2023-02-18 20:02:42 +00:00
listen-http = "127.0.0.1:8004";
2023-02-18 19:54:15 +00:00
behind-proxy = true;
auth-file = "/var/lib/ntfy-sh/user.db";
auth-default-access = "deny-all";
cache-file = "/var/lib/ntfy-sh/cache.db";
2023-02-18 19:57:42 +00:00
attachment-cache-dir = "/var/lib/ntfy-sh/cache-attachments";
2023-02-18 19:54:15 +00:00
2023-02-18 20:29:47 +00:00
upstream-base-url = "https://ntfy.sh";
2023-02-18 19:54:15 +00:00
keepalive-interval = "45s";
2023-07-21 11:59:14 +00:00
inherit (secret.ntfy) web-push-public-key web-push-private-key web-push-email-address;
web-push-file = "/var/lib/ntfy-sh/webpush.db";
2023-02-18 19:54:15 +00:00
};
};
2023-03-06 14:25:59 +00:00
2023-03-06 22:39:49 +00:00
services.nginx.virtualHosts."ntfy.kempkens.io" = {
2023-04-03 13:03:52 +00:00
quic = true;
2023-03-06 22:39:49 +00:00
http3 = true;
forceSSL = true;
useACMEHost = "kempkens.io";
extraConfig = ''
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" always;
'';
locations."/" = {
recommendedProxySettings = true;
proxyWebsockets = true;
proxyPass = "http://127.0.0.1:8004";
2023-03-06 14:25:59 +00:00
};
};
2023-02-18 19:54:15 +00:00
}