From 9acd9716da0aa6d46a766ffc6475fe68f7a6bb0d Mon Sep 17 00:00:00 2001 From: notohh Date: Sat, 30 Dec 2023 18:02:40 -0500 Subject: [PATCH] sora: switch to ntfy from gotify --- hosts/sora/services/default.nix | 2 +- hosts/sora/services/gotify.nix | 7 ------- hosts/sora/services/ntfy-sh.nix | 13 +++++++++++++ hosts/sora/services/traefik.nix | 16 ++++++++-------- 4 files changed, 22 insertions(+), 16 deletions(-) delete mode 100644 hosts/sora/services/gotify.nix create mode 100644 hosts/sora/services/ntfy-sh.nix diff --git a/hosts/sora/services/default.nix b/hosts/sora/services/default.nix index 727a59c..90f2765 100644 --- a/hosts/sora/services/default.nix +++ b/hosts/sora/services/default.nix @@ -2,7 +2,7 @@ imports = [ ./traefik.nix ./uptimekuma.nix - ./gotify.nix + ./ntfy-sh.nix ./tailscale.nix ./factorio.nix # ./minecraft.nix diff --git a/hosts/sora/services/gotify.nix b/hosts/sora/services/gotify.nix deleted file mode 100644 index 9f8eee1..0000000 --- a/hosts/sora/services/gotify.nix +++ /dev/null @@ -1,7 +0,0 @@ -_: { - networking.firewall.allowedTCPPorts = [3000]; - services.gotify = { - enable = true; - port = 3000; - }; -} diff --git a/hosts/sora/services/ntfy-sh.nix b/hosts/sora/services/ntfy-sh.nix new file mode 100644 index 0000000..f7c104a --- /dev/null +++ b/hosts/sora/services/ntfy-sh.nix @@ -0,0 +1,13 @@ +{pkgs, ...}: { + environment.systemPackages = [pkgs.ntfy-sh]; + services.ntfy-sh = { + enable = true; + settings = { + listen-http = ":8090"; + base-url = "https://ntfy.flake.sh"; + upstream-base-url = "https://ntfy.sh"; + behind-proxy = true; + auth-default-access = "read-only"; + }; + }; +} diff --git a/hosts/sora/services/traefik.nix b/hosts/sora/services/traefik.nix index f9bce0e..22ec9d3 100644 --- a/hosts/sora/services/traefik.nix +++ b/hosts/sora/services/traefik.nix @@ -55,13 +55,6 @@ tls.domains = [{main = "*.flake.sh";}]; tls.certresolver = "production"; }; - gotify = { - rule = "Host(`gotify.flake.sh`)"; - entrypoints = ["websecure"]; - service = "gotify"; - tls.domains = [{main = "*.flake.sh";}]; - tls.certresolver = "production"; - }; conduit = { rule = "Host(`matrix.flake.sh`)"; entrypoints = ["websecure"]; @@ -133,6 +126,13 @@ tls.domains = [{main = "*.flake.sh";}]; tls.certresolver = "production"; }; + ntfy = { + rule = "Host(`ntfy.flake.sh`)"; + entrypoints = ["websecure"]; + service = "ntfy-sh"; + tls.domains = [{main = "*.flake.sh";}]; + tls.certresolver = "production"; + }; }; services = { forgejo.loadBalancer = { @@ -140,7 +140,6 @@ servers = [{url = "http://100.121.201.47:3200";}]; }; uptime-kuma.loadBalancer.servers = [{url = "http://100.104.42.96:4000";}]; - gotify.loadBalancer.servers = [{url = "http://100.104.42.96:3000";}]; conduit.loadBalancer.servers = [{url = "http://100.121.201.47:6167";}]; authelia.loadBalancer.servers = [{url = "http://100.121.201.47:9091";}]; foundryvtt.loadBalancer.servers = [{url = "http://100.121.201.47:30000";}]; @@ -151,6 +150,7 @@ searxng.loadBalancer.servers = [{url = "http://100.121.201.47:8100";}]; neko.loadBalancer.servers = [{url = "http://100.104.42.96:8085";}]; justlog.loadBalancer.servers = [{url = "http://100.121.201.47:8025";}]; + ntfy-sh.loadBalancer.servers = [{url = "http://100.104.42.96:8090";}]; }; }; };