summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/nixos/nofitications.linus.onl/default.nix11
1 files changed, 2 insertions, 9 deletions
diff --git a/modules/nixos/nofitications.linus.onl/default.nix b/modules/nixos/nofitications.linus.onl/default.nix
index d77a0e7..c2064ec 100644
--- a/modules/nixos/nofitications.linus.onl/default.nix
+++ b/modules/nixos/nofitications.linus.onl/default.nix
@@ -8,9 +8,6 @@
domain = "notifications.linus.onl";
- # TODO: Make option internal-port.
- internal-port = 13082;
-
cfg = config.modules."notifications.linus.onl";
in {
options.modules."notifications.linus.onl" = {
@@ -22,22 +19,18 @@ in {
config = mkIf cfg.enable {
services.push-notification-api = {
enable = true;
- # host = "notifications.linus.onl";
- host = "0.0.0.0";
- port = internal-port;
- openFirewall = false; # We're using NGINX reverse proxy.
};
# Register domain name.
services.cloudflare-dyndns.domains = ["notifications.linus.onl"];
- # Serve the generated page using NGINX.
+ # Use NGINX as reverse proxy.
services.nginx.virtualHosts."notifications.linus.onl" = {
enableACME = cfg.useACME;
forceSSL = cfg.useACME;
locations."/" = {
recommendedProxySettings = true;
- proxyPass = "http://127.0.0.1:${toString internal-port}";
+ proxyPass = "http://unix:/run/push-notification-api.sock";
};
};
};