diff --git a/flake.nix b/flake.nix index e19b321..f6cc159 100644 --- a/flake.nix +++ b/flake.nix @@ -71,6 +71,7 @@ ./nixos/services/mautrix/whatsapp.nix ./nixos/services/mautrix/signal.nix ./nixos/services/nextcloud.nix + ./nixos/services/ntfy.nix ] []; vm-sway = diff --git a/hardware/alpine.nix b/hardware/alpine.nix index 7babbd0..29a68ee 100644 --- a/hardware/alpine.nix +++ b/hardware/alpine.nix @@ -140,14 +140,6 @@ in { enableACME = true; root = "/srv/www/tristans.cloud"; }; - "*.thebeanbakery.xyz" = { - globalRedirect = "thebeanbakery.xyz"; - }; - "thebeanbakery.xyz" = { - forceSSL = true; - enableACME = true; - root = "/srv/www/thebeanbakery.xyz"; - }; "auth.tristans.cloud" = { forceSSL = true; enableACME = true; diff --git a/nixos/services/ntfy.nix b/nixos/services/ntfy.nix new file mode 100644 index 0000000..6eaf84d --- /dev/null +++ b/nixos/services/ntfy.nix @@ -0,0 +1,19 @@ +{ config, ... }: +let + domain = "up.${config.networking.domain}"; + port = 8080; +in +{ + services.ntfy-sh = { + enable = true; + settings = { + base-url = "https://${domain}"; + listen-http = ":${toString port}"; + }; + }; + services.nginx.virtualHosts.${domain} = { + forceSSL = true; + enableACME = true; + locations."~".proxyPass = "http://localhost:${toString port}"; + }; +}