ntfy.nix 885 B

1234567891011121314151617181920212223242526272829303132
  1. { config, ... }:
  2. {
  3. services.mollysocket.enable = true;
  4. services.mollysocket.settings = {
  5. port = 4337;
  6. allowed_endpoints = [ "https://ntfy.odin.t5.st/" ];
  7. allowed_uuids = [ "fa14700c-a870-4f6d-8cfc-3be1466903c6" ];
  8. };
  9. services.mollysocket.logLevel = "debug";
  10. services.mollysocket.environmentFile =
  11. config.age.secrets."odin/services/mollysocket".path;
  12. services.caddy.virtualHosts.mollysocket = {
  13. hostName = "mollysocket.odin.t5.st";
  14. extraConfig = ''
  15. encode gzip zstd
  16. reverse_proxy 127.0.0.1:4337
  17. '';
  18. };
  19. services.ntfy-sh.enable = true;
  20. services.ntfy-sh.settings.base-url = "https://ntfy.odin.t5.st";
  21. services.ntfy-sh.settings.listen-http = "127.0.0.1:5267";
  22. services.caddy.virtualHosts.ntfy = {
  23. hostName = "ntfy.odin.t5.st";
  24. extraConfig = ''
  25. encode gzip zstd
  26. reverse_proxy 127.0.0.1:5267
  27. '';
  28. };
  29. }