diff options
author | lassulus <git@lassul.us> | 2023-06-19 03:25:39 +0200 |
---|---|---|
committer | lassulus <git@lassul.us> | 2023-06-19 03:25:39 +0200 |
commit | 139799c53cdaf55c362109e01be9dd96cc8700ed (patch) | |
tree | b1ce719ec8f62458bce2d9fe2191b8d004630f2a /makefu/2configs/deployment/ntfysh.nix | |
parent | cb8fbb09127392a17d698d91f78ede7ae46accb8 (diff) | |
parent | a766e88e7c8d87aa6bdbde796d3a454f7b5e546e (diff) |
Merge remote-tracking branch 'gum/master'
Diffstat (limited to 'makefu/2configs/deployment/ntfysh.nix')
-rw-r--r-- | makefu/2configs/deployment/ntfysh.nix | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/makefu/2configs/deployment/ntfysh.nix b/makefu/2configs/deployment/ntfysh.nix new file mode 100644 index 000000000..1a3311d9e --- /dev/null +++ b/makefu/2configs/deployment/ntfysh.nix @@ -0,0 +1,41 @@ +{ lib, config, ... }: +let + web-port = 19455; + hostn = "ntfy.euer.krebsco.de"; + internal-ip = config.krebs.build.host.nets.retiolum.ip4.addr; +in +{ + services.ntfy-sh = { + enable = true; + settings = { + listen-http = "127.0.0.1:${toString web-port}"; + auth-file = "/var/lib/ntfy-sh/user.db"; + auth-default-access = "deny-all"; + behind-proxy = true; + attachment-cache-dir = "/media/cloud/ntfy-sh/attachments"; + attachment-file-size-limit = "500m"; + attachment-total-size-limit = "100g"; + base-url = "https://ntfy.euer.krebsco.de"; + attachment-expiry-duration = "48h"; + }; + }; + + systemd.services.ntfy-sh.serviceConfig = { + StateDirectory = "ntfy-sh"; + SupplementaryGroups = [ "download" ]; + }; + + services.nginx = { + enable = lib.mkDefault true; + virtualHosts."${hostn}" = { + forceSSL = true; + enableACME = true; + + locations."/" = { + proxyPass = "http://localhost:${toString web-port}/"; + proxyWebsockets = true; + recommendedProxySettings = true; + }; + }; + }; +} |