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"
"anotherhadi.com"
"www.anotherhadi.com"
"ntfy.anotherhadi.com"
];
proxied = true;
apiTokenFile = "/etc/cloudflare/apiToken";

View File

@ -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 ];
};
services.nginx.virtualHosts.${hostname} = {
enableACME = true;
forceSSL = true;
locations."/" = { proxyPass = "http://127.0.0.1:${port}"; };
};
networking.firewall.allowedTCPPorts = [ port ];
}

View File

@ -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
];