This commit is contained in:
Hadi 2024-06-19 23:47:35 +02:00
parent 21482d4a44
commit cafce8e7c9
3 changed files with 23 additions and 24 deletions

View File

@ -8,6 +8,7 @@
"vault.anotherhadi.com" "vault.anotherhadi.com"
"anotherhadi.com" "anotherhadi.com"
"www.anotherhadi.com" "www.anotherhadi.com"
"ntfy.anotherhadi.com"
]; ];
proxied = true; proxied = true;
apiTokenFile = "/etc/cloudflare/apiToken"; apiTokenFile = "/etc/cloudflare/apiToken";

View File

@ -1,26 +1,24 @@
# Push Notification Server # Push Notification Server
# https://mynixos.com/nixpkgs/options/services.ntfy-sh # https://mynixos.com/nixpkgs/options/services.ntfy-sh
let let
hostname = "ntfy.anotherhadi.com"; hostname = "ntfy.anotherhadi.com";
url = "https://"+hostname; url = "https://" + hostname;
port = 8082; port = 8082;
in{ in {
services.ntfy-sh = { services.ntfy-sh = {
enable = true; enable = true;
settings = { settings = {
base-url = url; base-url = url;
listen-http = "${port}"; listen-http = "${port}";
# auth-file = "/etc/ntfy-sh/authfile" # auth-file = "/etc/ntfy-sh/authfile"
auth-default-access = "deny-all"; auth-default-access = "deny-all";
behind-proxy = true; behind-proxy = true;
};
}; };
services.nginx.virtualHosts.${hostname} = { };
enableACME = true; services.nginx.virtualHosts.${hostname} = {
forceSSL = true; enableACME = true;
locations."/" = { forceSSL = true;
proxyPass = "http://127.0.0.1:${port}"; locations."/" = { proxyPass = "http://127.0.0.1:${port}"; };
}; };
}; networking.firewall.allowedTCPPorts = [ port ];
networking.firewall.allowedTCPPorts = [ port ];
} }

View File

@ -12,9 +12,9 @@
# ../modules/server/homepage/default.nix # ../modules/server/homepage/default.nix
../modules/server/adguard.nix ../modules/server/adguard.nix
# ../modules/server/ntfy-sh.nix ../modules/server/ntfy-sh.nix
../modules/server/tailscale.nix ../modules/server/tailscale.nix
../modules/server/unifi.nix # ../modules/server/unifi.nix # FIXME: unifi5 is deprecated
]; ];