1
0
Fork 0

ntfy-sh: init

This commit is contained in:
Daniel Kempkens 2023-02-18 20:54:15 +01:00
parent 1aa662c85f
commit 3648b19d9d
Signed by: daniel
SSH key fingerprint: SHA256:Ks/MyhQYcPRQiwMKLAKquWCdCPe3JXlb1WttgnAoSeM
3 changed files with 48 additions and 0 deletions

Binary file not shown.

View file

@ -26,6 +26,8 @@ in
../nixos/nitter.nix ../nixos/nitter.nix
(import ../nixos/ntfy-sh.nix (args // { inherit secret; }))
../nixos/synapse.nix ../nixos/synapse.nix
../nixos/websites.nix ../nixos/websites.nix

46
system/nixos/ntfy-sh.nix Normal file
View file

@ -0,0 +1,46 @@
{ secret, ... }:
{
services.ntfy-sh = {
enable = true;
settings = {
base-url = secret.ntfy.baseUrl;
listen-unix = "/run/ntfy-sh/ntfy.socket";
behind-proxy = true;
auth-file = "/var/lib/ntfy-sh/user.db";
auth-default-access = "deny-all";
cache-file = "/var/lib/ntfy-sh/cache.db";
attachment-cache-dir = "/var/cache/ntfy/attachments";
keepalive-interval = "45s";
};
};
services.nginx = {
enable = true;
virtualHosts."${secret.ntfy.web-domain}" = {
listen = [
{
addr = "127.0.0.1";
port = 80;
}
];
forceSSL = false;
enableACME = false;
locations."/" = {
tryFiles = "$uri @proxy";
};
locations."@proxy" = {
proxyWebsockets = true;
recommendedProxySettings = true;
proxyPass = "http://unix:/run/ntfy-sh/ntfy.socket";
};
};
};
}