1
0

ntfy.nix 881 B

12345678910111213141516171819202122232425262728293031
  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 = config.age.secrets."odin/services/mollysocket".path;
  11. services.caddy.virtualHosts.mollysocket = {
  12. hostName = "mollysocket.odin.t5.st";
  13. extraConfig = ''
  14. encode gzip zstd
  15. reverse_proxy 127.0.0.1:4337
  16. '';
  17. };
  18. services.ntfy-sh.enable = true;
  19. services.ntfy-sh.settings.base-url = "https://ntfy.odin.t5.st";
  20. services.ntfy-sh.settings.listen-http = "127.0.0.1:5267";
  21. services.caddy.virtualHosts.ntfy = {
  22. hostName = "ntfy.odin.t5.st";
  23. extraConfig = ''
  24. encode gzip zstd
  25. reverse_proxy 127.0.0.1:5267
  26. '';
  27. };
  28. }