diff --git a/hosts/modules/server/cloudflare-dyndns.nix b/hosts/modules/server/cloudflare-dyndns.nix index ba135fd..230fa04 100644 --- a/hosts/modules/server/cloudflare-dyndns.nix +++ b/hosts/modules/server/cloudflare-dyndns.nix @@ -8,6 +8,7 @@ "vault.anotherhadi.com" "anotherhadi.com" "www.anotherhadi.com" + "ntfy.anotherhadi.com" ]; proxied = true; apiTokenFile = "/etc/cloudflare/apiToken"; diff --git a/hosts/modules/server/ntfy-sh.nix b/hosts/modules/server/ntfy-sh.nix index 3fed02a..822f639 100644 --- a/hosts/modules/server/ntfy-sh.nix +++ b/hosts/modules/server/ntfy-sh.nix @@ -1,26 +1,24 @@ # Push Notification Server # https://mynixos.com/nixpkgs/options/services.ntfy-sh let - hostname = "ntfy.anotherhadi.com"; - url = "https://"+hostname; - port = 8082; -in{ - services.ntfy-sh = { - enable = true; - settings = { - base-url = url; - listen-http = "${port}"; - # auth-file = "/etc/ntfy-sh/authfile" - auth-default-access = "deny-all"; - behind-proxy = true; - }; + hostname = "ntfy.anotherhadi.com"; + url = "https://" + hostname; + port = 8082; +in { + services.ntfy-sh = { + enable = true; + settings = { + base-url = url; + listen-http = "${port}"; + # auth-file = "/etc/ntfy-sh/authfile" + auth-default-access = "deny-all"; + behind-proxy = true; }; - services.nginx.virtualHosts.${hostname} = { - enableACME = true; - forceSSL = true; - locations."/" = { - proxyPass = "http://127.0.0.1:${port}"; - }; - }; - networking.firewall.allowedTCPPorts = [ port ]; -} \ No newline at end of file + }; + services.nginx.virtualHosts.${hostname} = { + enableACME = true; + forceSSL = true; + locations."/" = { proxyPass = "http://127.0.0.1:${port}"; }; + }; + networking.firewall.allowedTCPPorts = [ port ]; +} diff --git a/hosts/server/configuration.nix b/hosts/server/configuration.nix index 99d174b..ce271a9 100644 --- a/hosts/server/configuration.nix +++ b/hosts/server/configuration.nix @@ -12,9 +12,9 @@ # ../modules/server/homepage/default.nix ../modules/server/adguard.nix - # ../modules/server/ntfy-sh.nix + ../modules/server/ntfy-sh.nix ../modules/server/tailscale.nix - ../modules/server/unifi.nix + # ../modules/server/unifi.nix # FIXME: unifi5 is deprecated ];